From d3ed9af16be5dc62ac23d3e6e053c9a40cf403a9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 22 Apr 2023 18:05:47 +0200 Subject: [PATCH] drop pwm patch from 5.10 and 5.15 --- ...plicitly-set-.polarity-in-.get_state.patch | 62 ------------------- ...plicitly-set-.polarity-in-.get_state.patch | 62 ------------------- 2 files changed, 124 deletions(-) delete mode 100644 queue-5.10/pwm-meson-explicitly-set-.polarity-in-.get_state.patch delete mode 100644 queue-5.15/pwm-meson-explicitly-set-.polarity-in-.get_state.patch diff --git a/queue-5.10/pwm-meson-explicitly-set-.polarity-in-.get_state.patch b/queue-5.10/pwm-meson-explicitly-set-.polarity-in-.get_state.patch deleted file mode 100644 index f138060a22c..00000000000 --- a/queue-5.10/pwm-meson-explicitly-set-.polarity-in-.get_state.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 8caa81eb950cb2e9d2d6959b37d853162d197f57 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= -Date: Wed, 22 Mar 2023 22:45:44 +0100 -Subject: pwm: meson: 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 8caa81eb950cb2e9d2d6959b37d853162d197f57 upstream. - -The driver only supports normal polarity. Complete the implementation of -.get_state() by setting .polarity accordingly. - -This fixes a regression that was possible since commit c73a3107624d -("pwm: Handle .get_state() failures") which stopped to zero-initialize -the state passed to the .get_state() callback. This was reported at -https://forum.odroid.com/viewtopic.php?f=177&t=46360 . While this was an -unintended side effect, the real issue is the driver's callback not -setting the polarity. - -There is a complicating fact, that the .apply() callback fakes support -for inversed polarity. This is not (and cannot) be matched by -.get_state(). As fixing this isn't easy, only point it out in a comment -to prevent authors of other drivers from copying that approach. - -Fixes: c375bcbaabdb ("pwm: meson: Read the full hardware state in meson_pwm_get_state()") -Reported-by: Munehisa Kamata -Acked-by: Martin Blumenstingl -Link: https://lore.kernel.org/r/20230310191405.2606296-1-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-meson.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - ---- a/drivers/pwm/pwm-meson.c -+++ b/drivers/pwm/pwm-meson.c -@@ -168,6 +168,12 @@ static int meson_pwm_calc(struct meson_p - duty = state->duty_cycle; - period = state->period; - -+ /* -+ * Note this is wrong. The result is an output wave that isn't really -+ * inverted and so is wrongly identified by .get_state as normal. -+ * Fixing this needs some care however as some machines might rely on -+ * this. -+ */ - if (state->polarity == PWM_POLARITY_INVERSED) - duty = period - duty; - -@@ -304,6 +310,8 @@ static int meson_pwm_apply(struct pwm_ch - meson_pwm_enable(meson, pwm); - } - -+ state->polarity = PWM_POLARITY_NORMAL; -+ - return 0; - } - diff --git a/queue-5.15/pwm-meson-explicitly-set-.polarity-in-.get_state.patch b/queue-5.15/pwm-meson-explicitly-set-.polarity-in-.get_state.patch deleted file mode 100644 index f138060a22c..00000000000 --- a/queue-5.15/pwm-meson-explicitly-set-.polarity-in-.get_state.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 8caa81eb950cb2e9d2d6959b37d853162d197f57 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= -Date: Wed, 22 Mar 2023 22:45:44 +0100 -Subject: pwm: meson: 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 8caa81eb950cb2e9d2d6959b37d853162d197f57 upstream. - -The driver only supports normal polarity. Complete the implementation of -.get_state() by setting .polarity accordingly. - -This fixes a regression that was possible since commit c73a3107624d -("pwm: Handle .get_state() failures") which stopped to zero-initialize -the state passed to the .get_state() callback. This was reported at -https://forum.odroid.com/viewtopic.php?f=177&t=46360 . While this was an -unintended side effect, the real issue is the driver's callback not -setting the polarity. - -There is a complicating fact, that the .apply() callback fakes support -for inversed polarity. This is not (and cannot) be matched by -.get_state(). As fixing this isn't easy, only point it out in a comment -to prevent authors of other drivers from copying that approach. - -Fixes: c375bcbaabdb ("pwm: meson: Read the full hardware state in meson_pwm_get_state()") -Reported-by: Munehisa Kamata -Acked-by: Martin Blumenstingl -Link: https://lore.kernel.org/r/20230310191405.2606296-1-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-meson.c | 8 ++++++++ - 1 file changed, 8 insertions(+) - ---- a/drivers/pwm/pwm-meson.c -+++ b/drivers/pwm/pwm-meson.c -@@ -168,6 +168,12 @@ static int meson_pwm_calc(struct meson_p - duty = state->duty_cycle; - period = state->period; - -+ /* -+ * Note this is wrong. The result is an output wave that isn't really -+ * inverted and so is wrongly identified by .get_state as normal. -+ * Fixing this needs some care however as some machines might rely on -+ * this. -+ */ - if (state->polarity == PWM_POLARITY_INVERSED) - duty = period - duty; - -@@ -304,6 +310,8 @@ static int meson_pwm_apply(struct pwm_ch - meson_pwm_enable(meson, pwm); - } - -+ state->polarity = PWM_POLARITY_NORMAL; -+ - return 0; - } - -- 2.47.3