]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2023 17:08:11 +0000 (19:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2023 17:08:11 +0000 (19:08 +0200)
added patches:
pwm-hibvt-explicitly-set-.polarity-in-.get_state.patch

queue-5.4/pwm-hibvt-explicitly-set-.polarity-in-.get_state.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/pwm-hibvt-explicitly-set-.polarity-in-.get_state.patch b/queue-5.4/pwm-hibvt-explicitly-set-.polarity-in-.get_state.patch
new file mode 100644 (file)
index 0000000..e990ff5
--- /dev/null
@@ -0,0 +1,35 @@
+From 6f57937980142715e927697a6ffd2050f38ed6f6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
+Date: Wed, 22 Mar 2023 22:45:40 +0100
+Subject: pwm: hibvt: Explicitly set .polarity in .get_state()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+
+commit 6f57937980142715e927697a6ffd2050f38ed6f6 upstream.
+
+The driver only both polarities. Complete the implementation of
+.get_state() by setting .polarity according to the configured hardware
+state.
+
+Fixes: d09f00810850 ("pwm: Add PWM driver for HiSilicon BVT SOCs")
+Link: https://lore.kernel.org/r/20230228135508.1798428-2-u.kleine-koenig@pengutronix.de
+Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
+Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/pwm/pwm-hibvt.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/pwm/pwm-hibvt.c
++++ b/drivers/pwm/pwm-hibvt.c
+@@ -146,6 +146,7 @@ static void hibvt_pwm_get_state(struct p
+       value = readl(base + PWM_CTRL_ADDR(pwm->hwpwm));
+       state->enabled = (PWM_ENABLE_MASK & value);
++      state->polarity = (PWM_POLARITY_MASK & value) ? PWM_POLARITY_INVERSED : PWM_POLARITY_NORMAL;
+ }
+ static int hibvt_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
index 5f29ee5f70d7c891dcbb066e19c5b439db218381..63eb2e83490fe585c5a0f43248c9f49c586740d2 100644 (file)
@@ -1,3 +1,4 @@
 rdma-cxgb4-check-skb-value-for-failure-to-allocate.patch
 platform-x86-hp-wmi-mark-driver-struct-with-__refdat.patch
 lib-test_meminit-fix-off-by-one-error-in-test_pages.patch
+pwm-hibvt-explicitly-set-.polarity-in-.get_state.patch