From: Greg Kroah-Hartman Date: Thu, 12 Oct 2023 17:08:11 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v6.1.58~40 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=99115f4294bc0d110c36f64300829f5cf09bc75e;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: pwm-hibvt-explicitly-set-.polarity-in-.get_state.patch --- 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 index 00000000000..e990ff588a4 --- /dev/null +++ b/queue-5.4/pwm-hibvt-explicitly-set-.polarity-in-.get_state.patch @@ -0,0 +1,35 @@ +From 6f57937980142715e927697a6ffd2050f38ed6f6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= +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 + +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 +Signed-off-by: Thierry Reding +Signed-off-by: Greg Kroah-Hartman +--- + 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, diff --git a/queue-5.4/series b/queue-5.4/series index 5f29ee5f70d..63eb2e83490 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -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