Skip to content

Commit f974022

Browse files
fabioestevammehmetb0
authored andcommitted
iio: adc: ti-ads124s08: Use gpiod_set_value_cansleep()
BugLink: https://bugs.launchpad.net/bugs/2097298 commit 2a8e34096ec70d73ebb6d9920688ea312700cbd9 upstream. Using gpiod_set_value() to control the reset GPIO causes some verbose warnings during boot when the reset GPIO is controlled by an I2C IO expander. As the caller can sleep, use the gpiod_set_value_cansleep() variant to fix the issue. Tested on a custom i.MX93 board with a ADS124S08 ADC. Cc: stable@kernel.org Fixes: e717f8c ("iio: adc: Add the TI ads124s08 ADC code") Signed-off-by: Fabio Estevam <festevam@gmail.com> Link: https://patch.msgid.link/20241122164308.390340-1-festevam@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Noah Wager <noah.wager@canonical.com> Signed-off-by: Koichiro Den <koichiro.den@canonical.com>
1 parent 9ecc228 commit f974022

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iio/adc/ti-ads124s08.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ static int ads124s_reset(struct iio_dev *indio_dev)
184184
struct ads124s_private *priv = iio_priv(indio_dev);
185185

186186
if (priv->reset_gpio) {
187-
gpiod_set_value(priv->reset_gpio, 0);
187+
gpiod_set_value_cansleep(priv->reset_gpio, 0);
188188
udelay(200);
189-
gpiod_set_value(priv->reset_gpio, 1);
189+
gpiod_set_value_cansleep(priv->reset_gpio, 1);
190190
} else {
191191
return ads124s_write_cmd(indio_dev, ADS124S08_CMD_RESET);
192192
}

0 commit comments

Comments
 (0)