mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 03:45:24 -04:00
pwm: berlin: Fix wrong register in suspend/resume
commit 3a4b9d027e4061766f618292df91760ea64a1fcc upstream.
The 'enable' register should be BERLIN_PWM_EN rather than
BERLIN_PWM_ENABLE, otherwise, the driver accesses wrong address, there
will be cpu exception then kernel panic during suspend/resume.
Fixes: bbf0722c1c ("pwm: berlin: Add suspend/resume support")
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Link: https://lore.kernel.org/r/20250819114224.31825-1-jszhang@kernel.org
Cc: stable@vger.kernel.org
[ukleinek: backport to 5.10]
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
18b7e4b960
commit
da3cadb8b0
1 changed files with 2 additions and 2 deletions
|
|
@ -249,7 +249,7 @@ static int berlin_pwm_suspend(struct device *dev)
|
|||
if (!channel)
|
||||
continue;
|
||||
|
||||
channel->enable = berlin_pwm_readl(pwm, i, BERLIN_PWM_ENABLE);
|
||||
channel->enable = berlin_pwm_readl(pwm, i, BERLIN_PWM_EN);
|
||||
channel->ctrl = berlin_pwm_readl(pwm, i, BERLIN_PWM_CONTROL);
|
||||
channel->duty = berlin_pwm_readl(pwm, i, BERLIN_PWM_DUTY);
|
||||
channel->tcnt = berlin_pwm_readl(pwm, i, BERLIN_PWM_TCNT);
|
||||
|
|
@ -280,7 +280,7 @@ static int berlin_pwm_resume(struct device *dev)
|
|||
berlin_pwm_writel(pwm, i, channel->ctrl, BERLIN_PWM_CONTROL);
|
||||
berlin_pwm_writel(pwm, i, channel->duty, BERLIN_PWM_DUTY);
|
||||
berlin_pwm_writel(pwm, i, channel->tcnt, BERLIN_PWM_TCNT);
|
||||
berlin_pwm_writel(pwm, i, channel->enable, BERLIN_PWM_ENABLE);
|
||||
berlin_pwm_writel(pwm, i, channel->enable, BERLIN_PWM_EN);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue