Re: [PATCH v2 1/2] gpio: shared-proxy: always serialize with a sleeping mutex

From: Viacheslav

Date: Fri Jun 26 2026 - 03:17:05 EST


Hi!

26.06.2026 08:54, Marek Szyprowski wrote:
On 25.06.2026 13:57, Viacheslav Bocharov wrote:
The shared GPIO descriptor used either a mutex or a spinlock, chosen at
runtime from the underlying chip's can_sleep:

shared_desc->can_sleep = gpiod_cansleep(shared_desc->desc);
... if (can_sleep) mutex_lock(); else spin_lock_irqsave();

...


The lock type was added by commit a060b8c511ab ("gpiolib: implement
low-level, shared GPIO support"); the sleeping call under it arrived with
the proxy driver.

Fixes: e992d54c6f97 ("gpio: shared-proxy: implement the shared GPIO proxy driver")
Reported-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>
Closes: https://lore.kernel.org/all/00107523-7737-4b92-a785-14ce4e93b8cb@xxxxxxxxxxx/
Signed-off-by: Viacheslav Bocharov <v@xxxxxxxxxxx>


Tested-by: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>


Thanks!


Best regards
--
Viacheslav Bocharov