From patchwork Wed Oct 4 17:54:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Fainelli X-Patchwork-Id: 13409139 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 31826E7C4E7 for ; Wed, 4 Oct 2023 17:54:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=3WWwp5CA+Ht5ve7dX4wrCqhshsyXg/1naCoysh1J/w8=; b=tF3 LDs21CIPrtkj8cuCX1rLjF+jW0fA7TXdLFYmhEU/OpkCkkeArlFgCbqoeQhQspFIecFLOULdWYjVg CXE6KJajJGD20+R9HrD984BiEH/VJF0JpmohJi1uusICEup36Z80q2zaphDoTL88YEC8tQsw+xV+U 8v97OXeFEVxwJHHbZslre/4w+vvcnbS5syddXiMpWfOjlQO3m56RWQtchADklRBu1+0YB6cNsBSrO bHabFdLdMxbNcu2LKP289KnvHK9J8egIHgNSVmeaK6oPEOo3UcwaRX7fdsCATrS8uDwTkYKj5YoDr yoPpkVrTnTJvJKg6cAULlwjppVQsfMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qo64l-000e4X-3B; Wed, 04 Oct 2023 17:54:23 +0000 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qo64j-000e3s-01 for linux-arm-kernel@lists.infradead.org; Wed, 04 Oct 2023 17:54:22 +0000 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-1c62d61dc96so243955ad.0 for ; Wed, 04 Oct 2023 10:54:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1696442059; x=1697046859; darn=lists.infradead.org; h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=+a+ZBeJuTJustl/4zriW36qn9nRJb2CaidgCdeT5yJE=; b=dnlHlOjRRYckvu4HHNLDcNNzjLrawLXZ6XFyreocsmkJMnz7JqZT+RO4l6+wcQ90eS hXYfeCc+BhcZxh0jBYR+vW8ERT8LL0kyNL6yojr7JsGP/bo/Dr4FyayWJ/2OPORDuz+A lMQ+X2j5yfBKU5t4hvqsevj2xZ85QJ8jg2y0E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696442059; x=1697046859; h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=+a+ZBeJuTJustl/4zriW36qn9nRJb2CaidgCdeT5yJE=; b=PUCkSW/nykk8Gj4x2YQkc1W2EYY6JfYSiqBxlrhb1dj1mlOc/u5AGySXo2JF5yrBpt Qp8EzEerGq8hvlIqAQ+feaokYCLVlap4Dv2c711QXE6Co8A/2R8QrcQa/z1Wb2oBY7fN /yGnIHGwiqLB26AcX48jP1cSWOyFzw/fLx/eRIT2D06ym9jo6SW7A+Fnr7rMw+O62GMg Lbah99xmrpJz7Kw6U+xzu5720IQ2Br5zZ8H1wWQeQPB9k4wM7DbxceUJjqZDhc/nbfTd 79KnM7C8MCiLSe/MJQ9bqeB0MrhOHlJG+QV94DeEWDKQs7Ps2IYGIfJVNdNV3erQdMJ0 hYYQ== X-Gm-Message-State: AOJu0Yxcs06T6QmTkwBfiJrGmkn82Ju/9lKDo+GAybdKUPa1A8k054/R Rq+z5QH9YuZUEbALR74rp7fO4A== X-Google-Smtp-Source: AGHT+IEDGkz49afCA7loanGGtOjk/7qRD4MRj4Kjf1x5HLRaOMqIYVelZjMDkh7Q2JMQ2Rn8r0newQ== X-Received: by 2002:a17:902:ce8b:b0:1bc:7441:d81a with SMTP id f11-20020a170902ce8b00b001bc7441d81amr3597033plg.6.1696442059415; Wed, 04 Oct 2023 10:54:19 -0700 (PDT) Received: from fainelli-desktop.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id g6-20020a170902c38600b001b567bbe82dsm4008921plg.150.2023.10.04.10.54.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 10:54:18 -0700 (PDT) From: Florian Fainelli To: linux-pwm@vger.kernel.org Cc: Florian Fainelli , Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Broadcom internal kernel review list , linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM7XXX ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume Date: Wed, 4 Oct 2023 10:54:14 -0700 Message-Id: <20231004175414.1738475-1-florian.fainelli@broadcom.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231004_105421_088854_D62AFB45 X-CRM114-Status: GOOD ( 13.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The suspend/resume functions currently utilize clk_disable()/clk_enable() respectively which may be no-ops with certain clock providers such as SCMI. Fix this to use clk_disable_unprepare() and clk_prepare_enable() respectively as we should. Fixes: 3a9f5957020f ("pwm: Add Broadcom BCM7038 PWM controller support") Signed-off-by: Florian Fainelli Acked-by: Uwe Kleine-König --- drivers/pwm/pwm-brcmstb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pwm/pwm-brcmstb.c b/drivers/pwm/pwm-brcmstb.c index a3faa9a3de7c..a7d529bf76ad 100644 --- a/drivers/pwm/pwm-brcmstb.c +++ b/drivers/pwm/pwm-brcmstb.c @@ -288,7 +288,7 @@ static int brcmstb_pwm_suspend(struct device *dev) { struct brcmstb_pwm *p = dev_get_drvdata(dev); - clk_disable(p->clk); + clk_disable_unprepare(p->clk); return 0; } @@ -297,7 +297,7 @@ static int brcmstb_pwm_resume(struct device *dev) { struct brcmstb_pwm *p = dev_get_drvdata(dev); - clk_enable(p->clk); + clk_prepare_enable(p->clk); return 0; }