diff options
author | Florian Fainelli <florian.fainelli@broadcom.com> | 2023-10-04 10:54:14 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-11-20 11:59:34 +0100 |
commit | 1498352ee9305dc89a4fb4e1b178199cd3b19342 (patch) | |
tree | 714d44a300e26544706f158ffa4ba5b803672fad | |
parent | 7ba9338af17bce8701ce162d3067e7aace313bae (diff) | |
download | linux-stable-1498352ee9305dc89a4fb4e1b178199cd3b19342.tar.gz linux-stable-1498352ee9305dc89a4fb4e1b178199cd3b19342.tar.bz2 linux-stable-1498352ee9305dc89a4fb4e1b178199cd3b19342.zip |
pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume
[ Upstream commit e9bc4411548aaa738905d37851a0146c16b3bb21 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/pwm/pwm-brcmstb.c | 4 |
1 files 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; } |