[PATCH v2 1/2] gpio: shared-proxy: always serialize with a sleeping mutex
Viacheslav
v at baodeep.com
Fri Jun 26 00:16:27 PDT 2026
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 at samsung.com>
>> Closes: https://lore.kernel.org/all/00107523-7737-4b92-a785-14ce4e93b8cb@samsung.com/
>> Signed-off-by: Viacheslav Bocharov <v at baodeep.com>
>
>
> Tested-by: Marek Szyprowski <m.szyprowski at samsung.com>
>
Thanks!
Best regards
--
Viacheslav Bocharov
More information about the linux-arm-kernel
mailing list