summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fainelli <florian.fainelli@broadcom.com>2023-10-04 10:54:14 -0700
committerThierry Reding <thierry.reding@gmail.com>2023-10-13 10:07:18 +0200
commite9bc4411548aaa738905d37851a0146c16b3bb21 (patch)
tree1167092776d4e8197c6a02043566f81afcb5f29c
parent87e51b76c9db8c29cde573af0faf5a3e13e23960 (diff)
downloadlwn-e9bc4411548aaa738905d37851a0146c16b3bb21.tar.gz
lwn-e9bc4411548aaa738905d37851a0146c16b3bb21.zip
pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume
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 <florian.fainelli@broadcom.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-rw-r--r--drivers/pwm/pwm-brcmstb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-brcmstb.c b/drivers/pwm/pwm-brcmstb.c
index 62bd01c08350..73fdd720f462 100644
--- a/drivers/pwm/pwm-brcmstb.c
+++ b/drivers/pwm/pwm-brcmstb.c
@@ -264,7 +264,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;
}
@@ -273,7 +273,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;
}