patch "iio: adc: ti-ads7950: normalize return value of gpio_get" added to char-misc-linus
Subsystems (2)
This is a note to let you know that I've just added the patch titled
iio: adc: ti-ads7950: normalize return value of gpio_get
to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From e2fa075d5ce1963e7cb7b0ac708ba567e5af66db Mon Sep 17 00:00:00 2001
From: Dmitry Torokhov <[email protected]>
Date: Thu, 5 Mar 2026 11:21:52 -0800
Subject: iio: adc: ti-ads7950: normalize return value of gpio_get
The GPIO get callback is expected to return 0 or 1 (or a negative error code). Ensure that the value returned by ti_ads7950_get() for output pins is normalized to the [0, 1] range.
--- drivers/iio/adc/ti-ads7950.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/ti-ads7950.c +1 -1
@@ -433,7 +433,7 @@ static int ti_ads7950_get(struct gpio_chip *chip, unsigned int offset)/* If set as output, return the output */ if (st->gpio_cmd_settings_bitmask &BIT (offset)) { - ret = st->cmd_settings_bitmask &BIT (offset); + ret = (st->cmd_settings_bitmask &BIT (offset)) ?1 :0 ; goto out; }
Signature · 1 line
2.53.0