mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-25 11:55:37 +00:00
pwm: atmel-hlcdc: Fix clock imbalance related to suspend support
The suspend callback disables the periph clock when the PWM is enabled
and resume reenables this clock if the PWM was disabled before. Judging
from the code comment it's suspend that is wrong here. Fix accordingly.
Fixes: f9bb9da7c0
("pwm: atmel-hlcdc: Implement the suspend/resume hooks")
Reviewed-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Link: https://lore.kernel.org/r/b51ea92b0a45eff3dc83b08adefd43d930df996c.1706269232.git.u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This commit is contained in:
parent
6613476e22
commit
e25ac87d3f
1 changed files with 1 additions and 1 deletions
|
@ -185,7 +185,7 @@ static int atmel_hlcdc_pwm_suspend(struct device *dev)
|
|||
struct atmel_hlcdc_pwm *atmel = dev_get_drvdata(dev);
|
||||
|
||||
/* Keep the periph clock enabled if the PWM is still running. */
|
||||
if (pwm_is_enabled(&atmel->chip.pwms[0]))
|
||||
if (!pwm_is_enabled(&atmel->chip.pwms[0]))
|
||||
clk_disable_unprepare(atmel->hlcdc->periph_clk);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue