Re: [PATCH] gpio: siox: normalize return value of gpio_get
From: Bartosz Golaszewski
Date: Wed Sep 23 2026 - 04:19:44 EST
On Tue, 22 Sep 2026 21:16:58 +0000, Ridham Khurana wrote:
> gpio_siox_get() returns the masked bit from the cached input or output
> byte, so for most lines a high level reads back as a value between 2
> and 128 instead of 1. The GPIO get callback is expected to return 0 or
> 1 (or a negative error code).
>
> Since commit 86ef402d805d ("gpiolib: sanitize the return value of
> gpio_chip::get()"), gpiolib rejected such values with -EBADE and reads
> of a high line failed. Commit ec2cceadfae7 ("gpiolib: normalize the
> return value of gc->get() on behalf of buggy drivers") made gpiolib
> clamp the value instead, but it now warns on every such read.
>
> [...]
Applied, thanks!
[1/1] gpio: siox: normalize return value of gpio_get
https://git.kernel.org/brgl/c/f24872823da61a6b9834cb806013fba53fa5e0ec
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>