Skip to content

Commit 092c2ef

Browse files
dougg3thierryreding
authored andcommitted
pwm: pxa: Use abrupt shutdown mode
Switch to abrupt shutdown mode in order to stop the clock as soon as possible when PWM is disabled. This minimizes the possibility of the clock being re-enabled while it is still in the process of turning off, which will result in the clock ending up erroneously disabled. Signed-off-by: Doug Brown <[email protected]> Reviewed-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Uwe Kleine-König <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 939d002 commit 092c2ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pwm/pwm-pxa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static int pxa_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
8585
else
8686
dc = mul_u64_u64_div_u64(pv + 1, duty_ns, period_ns);
8787

88-
writel(prescale, pc->mmio_base + offset + PWMCR);
88+
writel(prescale | PWMCR_SD, pc->mmio_base + offset + PWMCR);
8989
writel(dc, pc->mmio_base + offset + PWMDCR);
9090
writel(pv, pc->mmio_base + offset + PWMPCR);
9191

0 commit comments

Comments
 (0)