Skip to content

Commit 91d1016

Browse files
ukleinekbebarino
authored andcommitted
clk: pwm: Don't reconfigure running PWM at probe time
If the PWM is enabled already when .probe() is entered, period and duty_cycle are updated which essentially corresponds to a clock frequency change. This is unusual and surprising. So update the settings only when the clock gets prepared. Signed-off-by: Uwe Kleine-König <[email protected]> Link: https://lore.kernel.org/r/a974f1147e1a080bf5ad7f1752c92b24516df284.1746006578.git.ukleinek@baylibre.com Signed-off-by: Stephen Boyd <[email protected]>
1 parent 574c795 commit 91d1016

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

drivers/clk/clk-pwm.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,6 @@ static int clk_pwm_probe(struct platform_device *pdev)
109109

110110
pwm_init_state(pwm, &clk_pwm->state);
111111
pwm_set_relative_duty_cycle(&clk_pwm->state, 1, 2);
112-
113-
ret = pwm_apply_might_sleep(pwm, &clk_pwm->state);
114-
if (ret < 0)
115-
return ret;
116-
117-
/* set enabled only now to not enable output above */
118112
clk_pwm->state.enabled = true;
119113

120114
clk_name = node->name;

0 commit comments

Comments
 (0)