]> git.itanic.dy.fi Git - linux-stable/commit
pwm: atmel-hlcdc: Fix clock imbalance related to suspend support
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 26 Jan 2024 12:04:33 +0000 (13:04 +0100)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:16:38 +0000 (18:16 -0400)
commitbfbeb8785e3c7244e4bedd3fec575cfed13cf188
treea64a7ac0b9f023b8effce854cff3254b634d7297
parent9b2842c1f6effd08ab03ca54045bd570b37fd090
pwm: atmel-hlcdc: Fix clock imbalance related to suspend support

[ Upstream commit e25ac87d3f831fed002c34aadddaf4ebb4ea45ec ]

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: f9bb9da7c09d ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pwm/pwm-atmel-hlcdc.c