From 71a4ffc1fb4b31b9bdf1a33e6c0f49d9a05a2a68 Mon Sep 17 00:00:00 2001 From: robert jakub Date: Fri, 29 Nov 2024 15:25:02 +0100 Subject: [PATCH] backport 6.6.31-patches --- .../091-ir-rx51-pwm_apply_might_sleep.patch | 31 +++++++++++++++++ .../092-gpio-pwm-pwm_apply_might_sleep.patch | 33 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 uconsole/kernel/patches/091-ir-rx51-pwm_apply_might_sleep.patch create mode 100644 uconsole/kernel/patches/092-gpio-pwm-pwm_apply_might_sleep.patch diff --git a/uconsole/kernel/patches/091-ir-rx51-pwm_apply_might_sleep.patch b/uconsole/kernel/patches/091-ir-rx51-pwm_apply_might_sleep.patch new file mode 100644 index 0000000..3aaef6b --- /dev/null +++ b/uconsole/kernel/patches/091-ir-rx51-pwm_apply_might_sleep.patch @@ -0,0 +1,31 @@ +From 23431052d2dce8084b72e399fce82b05d86b847f Mon Sep 17 00:00:00 2001 +From: Ratchanan Srirattanamet +Date: Fri, 26 Apr 2024 00:45:15 +0700 +Subject: [PATCH] media/rc/ir-rx51: follow pwm_apply_might_sleep() rename + +Fixes: b23e6d7dbd31 ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()") +Signed-off-by: Ratchanan Srirattanamet +--- + drivers/media/rc/ir-rx51.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/media/rc/ir-rx51.c b/drivers/media/rc/ir-rx51.c +index 13e81bf8005df0..39a7e2db63a78b 100644 +--- a/drivers/media/rc/ir-rx51.c ++++ b/drivers/media/rc/ir-rx51.c +@@ -34,13 +34,13 @@ struct ir_rx51 { + static inline void ir_rx51_on(struct ir_rx51 *ir_rx51) + { + ir_rx51->state.enabled = true; +- pwm_apply_state(ir_rx51->pwm, &ir_rx51->state); ++ pwm_apply_might_sleep(ir_rx51->pwm, &ir_rx51->state); + } + + static inline void ir_rx51_off(struct ir_rx51 *ir_rx51) + { + ir_rx51->state.enabled = false; +- pwm_apply_state(ir_rx51->pwm, &ir_rx51->state); ++ pwm_apply_might_sleep(ir_rx51->pwm, &ir_rx51->state); + } + + static int init_timing_params(struct ir_rx51 *ir_rx51) diff --git a/uconsole/kernel/patches/092-gpio-pwm-pwm_apply_might_sleep.patch b/uconsole/kernel/patches/092-gpio-pwm-pwm_apply_might_sleep.patch new file mode 100644 index 0000000..5ec9114 --- /dev/null +++ b/uconsole/kernel/patches/092-gpio-pwm-pwm_apply_might_sleep.patch @@ -0,0 +1,33 @@ +From 879f34b88c60dd59765caa30576cb5bfb8e73c56 Mon Sep 17 00:00:00 2001 +From: Ratchanan Srirattanamet +Date: Fri, 26 Apr 2024 00:44:25 +0700 +Subject: [PATCH] drivers/gpio/gpio-pwm: follow pwm_apply_might_sleep() rename + +Fixes: b23e6d7dbd31 ("pwm: Rename pwm_apply_state() to pwm_apply_might_sleep()") +Signed-off-by: Ratchanan Srirattanamet +--- + drivers/gpio/gpio-pwm.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpio/gpio-pwm.c b/drivers/gpio/gpio-pwm.c +index 4a718b365a6fca..1dbdf8717eb3b9 100644 +--- a/drivers/gpio/gpio-pwm.c ++++ b/drivers/gpio/gpio-pwm.c +@@ -34,7 +34,7 @@ static void pwm_gpio_set(struct gpio_chip *gc, unsigned int off, int val) + + pwm_get_state(pwm_gpio->pwm[off], &state); + state.duty_cycle = val ? state.period : 0; +- pwm_apply_state(pwm_gpio->pwm[off], &state); ++ pwm_apply_might_sleep(pwm_gpio->pwm[off], &state); + } + + static int pwm_gpio_parse_dt(struct pwm_gpio *pwm_gpio, +@@ -79,7 +79,7 @@ static int pwm_gpio_parse_dt(struct pwm_gpio *pwm_gpio, + pwm_init_state(pwm_gpio->pwm[i], &state); + + state.duty_cycle = 0; +- pwm_apply_state(pwm_gpio->pwm[i], &state); ++ pwm_apply_might_sleep(pwm_gpio->pwm[i], &state); + } + + pwm_gpio->gc.ngpio = num_gpios;