Unverified Commit 91d10161 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Stephen Boyd
Browse files

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: default avatarUwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/a974f1147e1a080bf5ad7f1752c92b24516df284.1746006578.git.ukleinek@baylibre.com


Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 574c7958
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -109,12 +109,6 @@ static int clk_pwm_probe(struct platform_device *pdev)

	pwm_init_state(pwm, &clk_pwm->state);
	pwm_set_relative_duty_cycle(&clk_pwm->state, 1, 2);

	ret = pwm_apply_might_sleep(pwm, &clk_pwm->state);
	if (ret < 0)
		return ret;

	/* set enabled only now to not enable output above */
	clk_pwm->state.enabled = true;

	clk_name = node->name;