linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: aw9523: fix can_sleep flag for GPIO chip
@ 2025-07-03 14:30 Milan Krstic
  2025-07-04  8:31 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Milan Krstic @ 2025-07-03 14:30 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-gpio, David Bauer

The GPIO expander is connected via I2C, thus the can_sleep flag has to
be set to true. This fixes spurious "scheduling while atomic" bugs
in the kernel ringbuffer.

Signed-off-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Milan Krstic <milan.krstic@gmail.com>
---
 drivers/pinctrl/pinctrl-aw9523.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-aw9523.c b/drivers/pinctrl/pinctrl-aw9523.c
index 9bf53de20be8..04afb344e9e5 100644
--- a/drivers/pinctrl/pinctrl-aw9523.c
+++ b/drivers/pinctrl/pinctrl-aw9523.c
@@ -784,7 +784,7 @@ static int aw9523_init_gpiochip(struct aw9523 *awi, unsigned int npins)
 	gc->set_config = gpiochip_generic_config;
 	gc->parent = dev;
 	gc->owner = THIS_MODULE;
-	gc->can_sleep = false;
+	gc->can_sleep = true;
 
 	return 0;
 }
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] pinctrl: aw9523: fix can_sleep flag for GPIO chip
  2025-07-03 14:30 [PATCH] pinctrl: aw9523: fix can_sleep flag for GPIO chip Milan Krstic
@ 2025-07-04  8:31 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2025-07-04  8:31 UTC (permalink / raw)
  To: Milan Krstic; +Cc: linux-gpio, David Bauer

On Thu, Jul 3, 2025 at 4:33 PM Milan Krstic <milan.krstic@gmail.com> wrote:

> The GPIO expander is connected via I2C, thus the can_sleep flag has to
> be set to true. This fixes spurious "scheduling while atomic" bugs
> in the kernel ringbuffer.
>
> Signed-off-by: David Bauer <mail@david-bauer.net>
> Signed-off-by: Milan Krstic <milan.krstic@gmail.com>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-04  8:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-03 14:30 [PATCH] pinctrl: aw9523: fix can_sleep flag for GPIO chip Milan Krstic
2025-07-04  8:31 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).