* Re: [PATCH v2] pwm: stm32: Always program polarity
2026-01-08 12:45 [PATCH v2] pwm: stm32: Always program polarity Sean Nyekjaer
@ 2026-01-08 16:01 ` Uwe Kleine-König
2026-01-09 10:24 ` Patch "pwm: stm32: Always program polarity" has been added to the 5.10-stable tree gregkh
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Uwe Kleine-König @ 2026-01-08 16:01 UTC (permalink / raw)
To: Greg Kroah-Hartman, Sasha Levin
Cc: Sean Nyekjaer, Fabrice Gasnier, Maxime Coquelin, Alexandre Torgue,
linux-pwm, linux-stm32, linux-arm-kernel, linux-kernel, stable
[-- Attachment #1: Type: text/plain, Size: 1356 bytes --]
Hello Greg,
On Thu, Jan 08, 2026 at 01:45:23PM +0100, Sean Nyekjaer wrote:
> Commit 7346e7a058a2 ("pwm: stm32: Always do lazy disabling") triggered a
> regression where PWM polarity changes could be ignored.
>
> stm32_pwm_set_polarity() was skipped due to a mismatch between the
> cached pwm->state.polarity and the actual hardware state, leaving the
> hardware polarity unchanged.
>
> Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm")
> Cc: stable@vger.kernel.org # <= 6.12
> Signed-off-by: Sean Nyekjaer <sean@geanix.com>
> Co-developed-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
> ---
> This patch is only applicable for stable tree's <= 6.12
Can you please apply this patch to v6.12.x and older? The problem fixed
here doesn't happen in mainline since commit deaba9cff809 ("pwm: stm32:
Implementation of the waveform callbacks"). That mainline commit however
is too intrusive to backport it to stable, not even considering its
dependencies (e.g. 17e40c25158f ("pwm: New abstraction for PWM
waveforms")).
I assume such an exception to the sable process is ok and the patch is
simple enough to be easily reviewable? If not, tell me, then I can apply
the patch and merge it (with `-s ours`) into my next PWM pull request to
Linus :-)
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread* Patch "pwm: stm32: Always program polarity" has been added to the 5.10-stable tree
2026-01-08 12:45 [PATCH v2] pwm: stm32: Always program polarity Sean Nyekjaer
2026-01-08 16:01 ` Uwe Kleine-König
@ 2026-01-09 10:24 ` gregkh
2026-01-09 10:24 ` Patch "pwm: stm32: Always program polarity" has been added to the 5.15-stable tree gregkh
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: gregkh @ 2026-01-09 10:24 UTC (permalink / raw)
To: alexandre.torgue, fabrice.gasnier, linux-arm-kernel, linux-stm32,
mcoquelin.stm32, sean, u.kleine-koenig, ukleinek
Cc: stable-commits
This is a note to let you know that I've just added the patch titled
pwm: stm32: Always program polarity
to the 5.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
pwm-stm32-always-program-polarity.patch
and it can be found in the queue-5.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
From sean@geanix.com Fri Jan 9 11:22:32 2026
From: Sean Nyekjaer <sean@geanix.com>
Date: Thu, 08 Jan 2026 13:45:23 +0100
Subject: pwm: stm32: Always program polarity
To: "Fabrice Gasnier" <fabrice.gasnier@foss.st.com>, "Uwe Kleine-König" <ukleinek@kernel.org>, "Maxime Coquelin" <mcoquelin.stm32@gmail.com>, "Alexandre Torgue" <alexandre.torgue@foss.st.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>, linux-pwm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, "Sean Nyekjaer" <sean@geanix.com>
Message-ID: <20260108-stm32-pwm-v2-1-ced582974f8b@geanix.com>
From: Sean Nyekjaer <sean@geanix.com>
Commit 7346e7a058a2 ("pwm: stm32: Always do lazy disabling") triggered a
regression where PWM polarity changes could be ignored.
stm32_pwm_set_polarity() was skipped due to a mismatch between the
cached pwm->state.polarity and the actual hardware state, leaving the
hardware polarity unchanged.
Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm")
Cc: stable@vger.kernel.org # <= 6.12
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Co-developed-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
---
drivers/pwm/pwm-stm32.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -458,8 +458,7 @@ static int stm32_pwm_apply(struct pwm_ch
return 0;
}
- if (state->polarity != pwm->state.polarity)
- stm32_pwm_set_polarity(priv, pwm->hwpwm, state->polarity);
+ stm32_pwm_set_polarity(priv, pwm->hwpwm, state->polarity);
ret = stm32_pwm_config(priv, pwm->hwpwm,
state->duty_cycle, state->period);
Patches currently in stable-queue which might be from sean@geanix.com are
queue-5.10/pwm-stm32-always-program-polarity.patch
^ permalink raw reply [flat|nested] 7+ messages in thread* Patch "pwm: stm32: Always program polarity" has been added to the 5.15-stable tree
2026-01-08 12:45 [PATCH v2] pwm: stm32: Always program polarity Sean Nyekjaer
2026-01-08 16:01 ` Uwe Kleine-König
2026-01-09 10:24 ` Patch "pwm: stm32: Always program polarity" has been added to the 5.10-stable tree gregkh
@ 2026-01-09 10:24 ` gregkh
2026-01-09 10:24 ` Patch "pwm: stm32: Always program polarity" has been added to the 6.1-stable tree gregkh
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: gregkh @ 2026-01-09 10:24 UTC (permalink / raw)
To: alexandre.torgue, fabrice.gasnier, linux-arm-kernel, linux-stm32,
mcoquelin.stm32, sean, u.kleine-koenig, ukleinek
Cc: stable-commits
This is a note to let you know that I've just added the patch titled
pwm: stm32: Always program polarity
to the 5.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
pwm-stm32-always-program-polarity.patch
and it can be found in the queue-5.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
From sean@geanix.com Fri Jan 9 11:22:32 2026
From: Sean Nyekjaer <sean@geanix.com>
Date: Thu, 08 Jan 2026 13:45:23 +0100
Subject: pwm: stm32: Always program polarity
To: "Fabrice Gasnier" <fabrice.gasnier@foss.st.com>, "Uwe Kleine-König" <ukleinek@kernel.org>, "Maxime Coquelin" <mcoquelin.stm32@gmail.com>, "Alexandre Torgue" <alexandre.torgue@foss.st.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>, linux-pwm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, "Sean Nyekjaer" <sean@geanix.com>
Message-ID: <20260108-stm32-pwm-v2-1-ced582974f8b@geanix.com>
From: Sean Nyekjaer <sean@geanix.com>
Commit 7346e7a058a2 ("pwm: stm32: Always do lazy disabling") triggered a
regression where PWM polarity changes could be ignored.
stm32_pwm_set_polarity() was skipped due to a mismatch between the
cached pwm->state.polarity and the actual hardware state, leaving the
hardware polarity unchanged.
Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm")
Cc: stable@vger.kernel.org # <= 6.12
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Co-developed-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
---
drivers/pwm/pwm-stm32.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -458,8 +458,7 @@ static int stm32_pwm_apply(struct pwm_ch
return 0;
}
- if (state->polarity != pwm->state.polarity)
- stm32_pwm_set_polarity(priv, pwm->hwpwm, state->polarity);
+ stm32_pwm_set_polarity(priv, pwm->hwpwm, state->polarity);
ret = stm32_pwm_config(priv, pwm->hwpwm,
state->duty_cycle, state->period);
Patches currently in stable-queue which might be from sean@geanix.com are
queue-5.15/pwm-stm32-always-program-polarity.patch
^ permalink raw reply [flat|nested] 7+ messages in thread* Patch "pwm: stm32: Always program polarity" has been added to the 6.1-stable tree
2026-01-08 12:45 [PATCH v2] pwm: stm32: Always program polarity Sean Nyekjaer
` (2 preceding siblings ...)
2026-01-09 10:24 ` Patch "pwm: stm32: Always program polarity" has been added to the 5.15-stable tree gregkh
@ 2026-01-09 10:24 ` gregkh
2026-01-09 10:24 ` Patch "pwm: stm32: Always program polarity" has been added to the 6.6-stable tree gregkh
2026-01-09 10:24 ` Patch "pwm: stm32: Always program polarity" has been added to the 6.12-stable tree gregkh
5 siblings, 0 replies; 7+ messages in thread
From: gregkh @ 2026-01-09 10:24 UTC (permalink / raw)
To: alexandre.torgue, fabrice.gasnier, linux-arm-kernel, linux-stm32,
mcoquelin.stm32, sean, u.kleine-koenig, ukleinek
Cc: stable-commits
This is a note to let you know that I've just added the patch titled
pwm: stm32: Always program polarity
to the 6.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
pwm-stm32-always-program-polarity.patch
and it can be found in the queue-6.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
From sean@geanix.com Fri Jan 9 11:22:32 2026
From: Sean Nyekjaer <sean@geanix.com>
Date: Thu, 08 Jan 2026 13:45:23 +0100
Subject: pwm: stm32: Always program polarity
To: "Fabrice Gasnier" <fabrice.gasnier@foss.st.com>, "Uwe Kleine-König" <ukleinek@kernel.org>, "Maxime Coquelin" <mcoquelin.stm32@gmail.com>, "Alexandre Torgue" <alexandre.torgue@foss.st.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>, linux-pwm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, "Sean Nyekjaer" <sean@geanix.com>
Message-ID: <20260108-stm32-pwm-v2-1-ced582974f8b@geanix.com>
From: Sean Nyekjaer <sean@geanix.com>
Commit 7346e7a058a2 ("pwm: stm32: Always do lazy disabling") triggered a
regression where PWM polarity changes could be ignored.
stm32_pwm_set_polarity() was skipped due to a mismatch between the
cached pwm->state.polarity and the actual hardware state, leaving the
hardware polarity unchanged.
Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm")
Cc: stable@vger.kernel.org # <= 6.12
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Co-developed-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
---
drivers/pwm/pwm-stm32.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -458,8 +458,7 @@ static int stm32_pwm_apply(struct pwm_ch
return 0;
}
- if (state->polarity != pwm->state.polarity)
- stm32_pwm_set_polarity(priv, pwm->hwpwm, state->polarity);
+ stm32_pwm_set_polarity(priv, pwm->hwpwm, state->polarity);
ret = stm32_pwm_config(priv, pwm->hwpwm,
state->duty_cycle, state->period);
Patches currently in stable-queue which might be from sean@geanix.com are
queue-6.1/pwm-stm32-always-program-polarity.patch
^ permalink raw reply [flat|nested] 7+ messages in thread* Patch "pwm: stm32: Always program polarity" has been added to the 6.6-stable tree
2026-01-08 12:45 [PATCH v2] pwm: stm32: Always program polarity Sean Nyekjaer
` (3 preceding siblings ...)
2026-01-09 10:24 ` Patch "pwm: stm32: Always program polarity" has been added to the 6.1-stable tree gregkh
@ 2026-01-09 10:24 ` gregkh
2026-01-09 10:24 ` Patch "pwm: stm32: Always program polarity" has been added to the 6.12-stable tree gregkh
5 siblings, 0 replies; 7+ messages in thread
From: gregkh @ 2026-01-09 10:24 UTC (permalink / raw)
To: alexandre.torgue, fabrice.gasnier, linux-arm-kernel, linux-stm32,
mcoquelin.stm32, sean, u.kleine-koenig, ukleinek
Cc: stable-commits
This is a note to let you know that I've just added the patch titled
pwm: stm32: Always program polarity
to the 6.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
pwm-stm32-always-program-polarity.patch
and it can be found in the queue-6.6 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
From sean@geanix.com Fri Jan 9 11:22:32 2026
From: Sean Nyekjaer <sean@geanix.com>
Date: Thu, 08 Jan 2026 13:45:23 +0100
Subject: pwm: stm32: Always program polarity
To: "Fabrice Gasnier" <fabrice.gasnier@foss.st.com>, "Uwe Kleine-König" <ukleinek@kernel.org>, "Maxime Coquelin" <mcoquelin.stm32@gmail.com>, "Alexandre Torgue" <alexandre.torgue@foss.st.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>, linux-pwm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, "Sean Nyekjaer" <sean@geanix.com>
Message-ID: <20260108-stm32-pwm-v2-1-ced582974f8b@geanix.com>
From: Sean Nyekjaer <sean@geanix.com>
Commit 7346e7a058a2 ("pwm: stm32: Always do lazy disabling") triggered a
regression where PWM polarity changes could be ignored.
stm32_pwm_set_polarity() was skipped due to a mismatch between the
cached pwm->state.polarity and the actual hardware state, leaving the
hardware polarity unchanged.
Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm")
Cc: stable@vger.kernel.org # <= 6.12
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Co-developed-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
---
drivers/pwm/pwm-stm32.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -462,8 +462,7 @@ static int stm32_pwm_apply(struct pwm_ch
return 0;
}
- if (state->polarity != pwm->state.polarity)
- stm32_pwm_set_polarity(priv, pwm->hwpwm, state->polarity);
+ stm32_pwm_set_polarity(priv, pwm->hwpwm, state->polarity);
ret = stm32_pwm_config(priv, pwm->hwpwm,
state->duty_cycle, state->period);
Patches currently in stable-queue which might be from sean@geanix.com are
queue-6.6/pwm-stm32-always-program-polarity.patch
^ permalink raw reply [flat|nested] 7+ messages in thread* Patch "pwm: stm32: Always program polarity" has been added to the 6.12-stable tree
2026-01-08 12:45 [PATCH v2] pwm: stm32: Always program polarity Sean Nyekjaer
` (4 preceding siblings ...)
2026-01-09 10:24 ` Patch "pwm: stm32: Always program polarity" has been added to the 6.6-stable tree gregkh
@ 2026-01-09 10:24 ` gregkh
5 siblings, 0 replies; 7+ messages in thread
From: gregkh @ 2026-01-09 10:24 UTC (permalink / raw)
To: alexandre.torgue, fabrice.gasnier, linux-arm-kernel, linux-stm32,
mcoquelin.stm32, sean, u.kleine-koenig, ukleinek
Cc: stable-commits
This is a note to let you know that I've just added the patch titled
pwm: stm32: Always program polarity
to the 6.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
pwm-stm32-always-program-polarity.patch
and it can be found in the queue-6.12 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
From sean@geanix.com Fri Jan 9 11:22:32 2026
From: Sean Nyekjaer <sean@geanix.com>
Date: Thu, 08 Jan 2026 13:45:23 +0100
Subject: pwm: stm32: Always program polarity
To: "Fabrice Gasnier" <fabrice.gasnier@foss.st.com>, "Uwe Kleine-König" <ukleinek@kernel.org>, "Maxime Coquelin" <mcoquelin.stm32@gmail.com>, "Alexandre Torgue" <alexandre.torgue@foss.st.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>, linux-pwm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, "Sean Nyekjaer" <sean@geanix.com>
Message-ID: <20260108-stm32-pwm-v2-1-ced582974f8b@geanix.com>
From: Sean Nyekjaer <sean@geanix.com>
Commit 7346e7a058a2 ("pwm: stm32: Always do lazy disabling") triggered a
regression where PWM polarity changes could be ignored.
stm32_pwm_set_polarity() was skipped due to a mismatch between the
cached pwm->state.polarity and the actual hardware state, leaving the
hardware polarity unchanged.
Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm")
Cc: stable@vger.kernel.org # <= 6.12
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Co-developed-by: Uwe Kleine-König <ukleinek@kernel.org>
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
---
drivers/pwm/pwm-stm32.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/pwm/pwm-stm32.c
+++ b/drivers/pwm/pwm-stm32.c
@@ -458,8 +458,7 @@ static int stm32_pwm_apply(struct pwm_ch
return 0;
}
- if (state->polarity != pwm->state.polarity)
- stm32_pwm_set_polarity(priv, pwm->hwpwm, state->polarity);
+ stm32_pwm_set_polarity(priv, pwm->hwpwm, state->polarity);
ret = stm32_pwm_config(priv, pwm->hwpwm,
state->duty_cycle, state->period);
Patches currently in stable-queue which might be from sean@geanix.com are
queue-6.12/pwm-stm32-always-program-polarity.patch
^ permalink raw reply [flat|nested] 7+ messages in thread