[GIT PULL] pwm: Fix an off-by-one in the stm32 driver
From: Uwe Kleine-König
Date: Fri Sep 06 2024 - 04:46:29 EST
Hello Linus,
the following changes since commit 8400291e289ee6b2bf9779ff1c83a291501f017b:
Linux 6.11-rc1 (2024-07-28 14:19:55 -0700)
are available in the Git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git tags/pwm/for-6.11-rc7-fixes
for you to fetch changes up to 10c48e9a8fd5e524d37559cf4a06039b4c25db48:
pwm: stm32: Use the right CCxNP bit in stm32_pwm_enable() (2024-09-05 11:12:01 +0200)
This gives you just a single fix for a commit from the last merge
window.
Please pull this for 6.11-rc7.
Thanks
Uwe
----------------------------------------------------------------
pwm: 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.
With the commits
796b942f6596 ("mfd: stm32-timers: Add some register definitions with a parameter")
7cea05ae1d4e ("pwm-stm32: Make use of parametrised register definitions")
(merged for v6.11-rc1) I tried to improve the situation and make this
counting mismatch more explicit and transparent. However in one instance
I failed to add the needed +1.
This was noticed by Fabrice Gasnier (however in a way that made me
hesitate to add a "Reported-by:" tag, see
https://lore.kernel.org/linux-pwm/3515a8f3-436e-4d14-9bac-dfe6aa869819@xxxxxxxxxxx),
thanks to him for catching the issue.
A small patch fixing that mismatch is the only change included here.
----------------------------------------------------------------
Uwe Kleine-König (1):
pwm: stm32: Use the right CCxNP bit in stm32_pwm_enable()
drivers/pwm/pwm-stm32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Attachment:
signature.asc
Description: PGP signature