Skip to content

Commit

Permalink
pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume
Browse files Browse the repository at this point in the history
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: 3a9f595 ("pwm: Add Broadcom BCM7038 PWM controller support")
Signed-off-by: Florian Fainelli <[email protected]>
Acked-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
  • Loading branch information
ffainelli authored and thierryreding committed Oct 13, 2023
1 parent 87e51b7 commit e9bc441
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/pwm/pwm-brcmstb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit e9bc441

Please sign in to comment.