Skip to content

Commit 939d002

Browse files
dougg3thierryreding
authored andcommitted
pwm: pxa: Remove clk enable/disable from pxa_pwm_config
Now that pxa_pwm_apply always enables the clock first, there is no need for pxa_pwm_config to do any clock enabling/disabling. 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 152f2d1 commit 939d002

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

drivers/pwm/pwm-pxa.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ static int pxa_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
6464
unsigned long long c;
6565
unsigned long period_cycles, prescale, pv, dc;
6666
unsigned long offset;
67-
int rc;
6867

6968
offset = pwm->hwpwm ? 0x10 : 0;
7069

@@ -86,18 +85,10 @@ static int pxa_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
8685
else
8786
dc = mul_u64_u64_div_u64(pv + 1, duty_ns, period_ns);
8887

89-
/* NOTE: the clock to PWM has to be enabled first
90-
* before writing to the registers
91-
*/
92-
rc = clk_prepare_enable(pc->clk);
93-
if (rc < 0)
94-
return rc;
95-
9688
writel(prescale, pc->mmio_base + offset + PWMCR);
9789
writel(dc, pc->mmio_base + offset + PWMDCR);
9890
writel(pv, pc->mmio_base + offset + PWMPCR);
9991

100-
clk_disable_unprepare(pc->clk);
10192
return 0;
10293
}
10394

0 commit comments

Comments
 (0)