From de74b626ea5954566f0d56a8ac12deebddda7783 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 24 Apr 2023 08:28:58 +0200 Subject: [PATCH] 5.10-stable patches added patches: pwm-hibvt-explicitly-set-.polarity-in-.get_state.patch pwm-iqs620a-explicitly-set-.polarity-in-.get_state.patch --- ...plicitly-set-.polarity-in-.get_state.patch | 36 +++++++++++++++++++ ...plicitly-set-.polarity-in-.get_state.patch | 36 +++++++++++++++++++ queue-5.10/series | 2 ++ 3 files changed, 74 insertions(+) create mode 100644 queue-5.10/pwm-hibvt-explicitly-set-.polarity-in-.get_state.patch create mode 100644 queue-5.10/pwm-iqs620a-explicitly-set-.polarity-in-.get_state.patch diff --git a/queue-5.10/pwm-hibvt-explicitly-set-.polarity-in-.get_state.patch b/queue-5.10/pwm-hibvt-explicitly-set-.polarity-in-.get_state.patch new file mode 100644 index 00000000000..e33d3a8ed60 --- /dev/null +++ b/queue-5.10/pwm-hibvt-explicitly-set-.polarity-in-.get_state.patch @@ -0,0 +1,36 @@ +From stable-owner@vger.kernel.org Mon Apr 24 07:31:20 2023 +From: "Uwe Kleine-König" +Date: Mon, 24 Apr 2023 07:31:05 +0200 +Subject: pwm: hibvt: Explicitly set .polarity in .get_state() +To: stable@vger.kernel.org +Cc: thierry.reding@gmail.com +Message-ID: <20230424053105.21872-2-u.kleine-koenig@pengutronix.de> + +From: "Uwe Kleine-König" + +[ Upstream commit 6f57937980142715e927697a6ffd2050f38ed6f6 ] + +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: Uwe Kleine-König +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.10/pwm-iqs620a-explicitly-set-.polarity-in-.get_state.patch b/queue-5.10/pwm-iqs620a-explicitly-set-.polarity-in-.get_state.patch new file mode 100644 index 00000000000..b64178ce998 --- /dev/null +++ b/queue-5.10/pwm-iqs620a-explicitly-set-.polarity-in-.get_state.patch @@ -0,0 +1,36 @@ +From stable-owner@vger.kernel.org Mon Apr 24 07:31:19 2023 +From: "Uwe Kleine-König" +Date: Mon, 24 Apr 2023 07:31:04 +0200 +Subject: pwm: iqs620a: Explicitly set .polarity in .get_state() +To: stable@vger.kernel.org +Cc: thierry.reding@gmail.com, Jeff LaBundy +Message-ID: <20230424053105.21872-1-u.kleine-koenig@pengutronix.de> + +From: "Uwe Kleine-König" + +[ Upstream commit b20b097128d9145fadcea1cbb45c4d186cb57466 ] + +The driver only supports normal polarity. Complete the implementation of +.get_state() by setting .polarity accordingly. + +Fixes: 6f0841a8197b ("pwm: Add support for Azoteq IQS620A PWM generator") +Reviewed-by: Jeff LaBundy +Link: https://lore.kernel.org/r/20230228135508.1798428-4-u.kleine-koenig@pengutronix.de +Signed-off-by: Uwe Kleine-König +Signed-off-by: Thierry Reding +Signed-off-by: Uwe Kleine-König +Signed-off-by: Greg Kroah-Hartman +--- + drivers/pwm/pwm-iqs620a.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/pwm/pwm-iqs620a.c ++++ b/drivers/pwm/pwm-iqs620a.c +@@ -132,6 +132,7 @@ static void iqs620_pwm_get_state(struct + mutex_unlock(&iqs620_pwm->lock); + + state->period = IQS620_PWM_PERIOD_NS; ++ state->polarity = PWM_POLARITY_NORMAL; + } + + static int iqs620_pwm_notifier(struct notifier_block *notifier, diff --git a/queue-5.10/series b/queue-5.10/series index 7b474f2d2ad..66625dd082e 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -61,3 +61,5 @@ inet6-remove-inet6_destroy_sock-in-sk-sk_prot-destroy.patch dccp-call-inet6_destroy_sock-via-sk-sk_destruct.patch sctp-call-inet6_destroy_sock-via-sk-sk_destruct.patch pwm-meson-explicitly-set-.polarity-in-.get_state.patch +pwm-iqs620a-explicitly-set-.polarity-in-.get_state.patch +pwm-hibvt-explicitly-set-.polarity-in-.get_state.patch -- 2.47.3