]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jan 2026 10:24:40 +0000 (11:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jan 2026 10:24:40 +0000 (11:24 +0100)
added patches:
pwm-stm32-always-program-polarity.patch

queue-6.12/pwm-stm32-always-program-polarity.patch [new file with mode: 0644]
queue-6.12/series

diff --git a/queue-6.12/pwm-stm32-always-program-polarity.patch b/queue-6.12/pwm-stm32-always-program-polarity.patch
new file mode 100644 (file)
index 0000000..f4958b3
--- /dev/null
@@ -0,0 +1,38 @@
+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);
index 790f47d01e32ffa2d1fc932a45960038f0533cb9..786f8c868754e345980890b5bbe2e24bc9b0f4ff 100644 (file)
@@ -12,3 +12,4 @@ sched-fair-small-cleanup-to-sched_balance_newidle.patch
 sched-fair-small-cleanup-to-update_newidle_cost.patch
 sched-fair-proportional-newidle-balance.patch
 virtio_console-fix-order-of-fields-cols-and-rows.patch
+pwm-stm32-always-program-polarity.patch