diff options
| author | Fabrice Gasnier <[email protected]> | 2024-12-17 15:00:21 +0000 |
|---|---|---|
| committer | Uwe Kleine-König <[email protected]> | 2024-12-18 10:08:36 +0000 |
| commit | edc19bd0e571c732cd01c8da62f904e6d2a29a48 (patch) | |
| tree | 96272a0dc1e82a7855cbb195dd166adc6e95ce90 /drivers/pwm/pwm-stm32.c | |
| parent | Linux 6.13-rc1 (diff) | |
| download | kernel-edc19bd0e571c732cd01c8da62f904e6d2a29a48.tar.gz kernel-edc19bd0e571c732cd01c8da62f904e6d2a29a48.zip | |
pwm: stm32: Fix complementary output in round_waveform_tohw()
When the timer supports complementary output, the CCxNE bit must be set
additionally to the CCxE bit. So to not overwrite the latter use |=
instead of = to set the former.
Fixes: deaba9cff809 ("pwm: stm32: Implementation of the waveform callbacks")
Signed-off-by: Fabrice Gasnier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ukleinek: Slightly improve commit log]
Signed-off-by: Uwe Kleine-König <[email protected]>
Diffstat (limited to 'drivers/pwm/pwm-stm32.c')
| -rw-r--r-- | drivers/pwm/pwm-stm32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/pwm-stm32.c b/drivers/pwm/pwm-stm32.c index b889e64522c3..17e591f61efb 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); |
