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: 3a9f595702
("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>
This commit is contained in:
parent
6e9b529589
commit
e3677bfcbb
@ -298,7 +298,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;
|
||||
}
|
||||
@ -307,7 +307,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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user