summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-stm32.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2025-04-04 23:04:35 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2025-04-04 23:04:35 -0700
commit946661e3bef8efa11ba8079d4ebafe6fc3b0aaad (patch)
treea90605abb7bb65503a2d3f93a79e19a01aaa5e89 /drivers/pwm/pwm-stm32.c
parentfd10709e28d2fa9015667aee56d92099fc97aa0d (diff)
parent4d395cb071a343196ca524d3694790f06978fe91 (diff)
Merge branch 'next' into for-linus
Prepare input updates for 6.15 merge window.
Diffstat (limited to 'drivers/pwm/pwm-stm32.c')
-rw-r--r--drivers/pwm/pwm-stm32.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c
index b889e64522c3d..a59de4de18b6e 100644
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -84,7 +84,7 @@ static int stm32_pwm_round_waveform_tohw(struct pwm_chip *chip,
wfhw->ccer = TIM_CCER_CCxE(ch + 1);
if (priv->have_complementary_output)
- wfhw->ccer = TIM_CCER_CCxNE(ch + 1);
+ wfhw->ccer |= TIM_CCER_CCxNE(ch + 1);
rate = clk_get_rate(priv->clk);
@@ -858,8 +858,11 @@ static int stm32_pwm_probe(struct platform_device *pdev)
chip->ops = &stm32pwm_ops;
/* Initialize clock refcount to number of enabled PWM channels. */
- for (i = 0; i < num_enabled; i++)
- clk_enable(priv->clk);
+ for (i = 0; i < num_enabled; i++) {
+ ret = clk_enable(priv->clk);
+ if (ret)
+ return ret;
+ }
ret = devm_pwmchip_add(dev, chip);
if (ret < 0)