Skip to content

Commit 8654fa5

Browse files
committed
Merge tag 'pwm/for-6.11-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux
Pull pwm fix from Uwe Kleine-König: "Fix an off-by-one in the stm32 driver. Hardware engineers tend to start counting at 1 while the software guys usually start with 0. This isn't so nice because that results in drivers where pwm device #2 needs to use the hardware registers with index 3. This was noticed by Fabrice Gasnier. A small patch fixing that mismatch is the only change included here" * tag 'pwm/for-6.11-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux: pwm: stm32: Use the right CCxNP bit in stm32_pwm_enable()
2 parents ea462f0 + 10c48e9 commit 8654fa5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pwm/pwm-stm32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ static int stm32_pwm_enable(struct stm32_pwm *priv, unsigned int ch)
412412
/* Enable channel */
413413
mask = TIM_CCER_CCxE(ch + 1);
414414
if (priv->have_complementary_output)
415-
mask |= TIM_CCER_CCxNE(ch);
415+
mask |= TIM_CCER_CCxNE(ch + 1);
416416

417417
regmap_set_bits(priv->regmap, TIM_CCER, mask);
418418

0 commit comments

Comments
 (0)