Skip to content

Commit 2a8e340

Browse files
fabioestevamjic23
authored andcommitted
iio: adc: ti-ads124s08: Use gpiod_set_value_cansleep()
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>
1 parent 75f339d commit 2a8e340

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
@@ -183,9 +183,9 @@ static int ads124s_reset(struct iio_dev *indio_dev)
183183
struct ads124s_private *priv = iio_priv(indio_dev);
184184

185185
if (priv->reset_gpio) {
186-
gpiod_set_value(priv->reset_gpio, 0);
186+
gpiod_set_value_cansleep(priv->reset_gpio, 0);
187187
udelay(200);
188-
gpiod_set_value(priv->reset_gpio, 1);
188+
gpiod_set_value_cansleep(priv->reset_gpio, 1);
189189
} else {
190190
return ads124s_write_cmd(indio_dev, ADS124S08_CMD_RESET);
191191
}

0 commit comments

Comments
 (0)