Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

pwm: stm32: Use the right CCxNP bit in stm32_pwm_enable()

The pwm devices for a pwm_chip are numbered starting at 0, the first hw
channel however has the number 1. While introducing a parametrised macro
to simplify register bit usage and making that offset explicit, one of
the usages was converted wrongly. This is fixed here.

Fixes: 7cea05ae1d4e ("pwm-stm32: Make use of parametrised register definitions")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20240905090627.197536-2-u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>

authored by

Uwe Kleine-König and committed by
Uwe Kleine-König
10c48e9a 8400291e

+1 -1
+1 -1
drivers/pwm/pwm-stm32.c
··· 412 412 /* Enable channel */ 413 413 mask = TIM_CCER_CCxE(ch + 1); 414 414 if (priv->have_complementary_output) 415 - mask |= TIM_CCER_CCxNE(ch); 415 + mask |= TIM_CCER_CCxNE(ch + 1); 416 416 417 417 regmap_set_bits(priv->regmap, TIM_CCER, mask); 418 418