mbox series

[GIT,PULL] pwm: Fix an off-by-one in the stm32 driver

Message ID 25x74hglxoyb33fphdrtxrpmvsqe5227d7vy6uo6ez77hjbrn6@dh637q6cvzax
State Accepted
Headers show
Series [GIT,PULL] pwm: Fix an off-by-one in the stm32 driver | expand

Pull-request

https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git tags/pwm/for-6.11-rc7-fixes

Message

Uwe Kleine-König Sept. 6, 2024, 8:46 a.m. UTC
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@foss.st.com),
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(-)

Comments

pr-tracker-bot@kernel.org Sept. 6, 2024, 7:12 p.m. UTC | #1
The pull request you sent on Fri, 6 Sep 2024 10:46:06 +0200:

> https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git tags/pwm/for-6.11-rc7-fixes

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/8654fa5ca3514263a079886b57521bcb20ee7cfd

Thank you!