projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
574c795
)
clk: pwm: Don't reconfigure running PWM at probe time
author
Uwe Kleine-König
<u.kleine-koenig@baylibre.com>
Wed, 30 Apr 2025 09:57:48 +0000
(11:57 +0200)
committer
Stephen Boyd
<sboyd@kernel.org>
Fri, 20 Jun 2025 01:09:56 +0000
(18:09 -0700)
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 <u.kleine-koenig@baylibre.com>
Link:
https://lore.kernel.org/r/a974f1147e1a080bf5ad7f1752c92b24516df284.1746006578.git.ukleinek@baylibre.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-pwm.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/clk/clk-pwm.c
b/drivers/clk/clk-pwm.c
index f5e6fef3f4d5dafde15183391667503640bd3f79..856828d5f58c4e8c1bf0a40d8c12477227115479 100644
(file)
--- a/
drivers/clk/clk-pwm.c
+++ b/
drivers/clk/clk-pwm.c
@@
-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;