Skip to content
Snippets Groups Projects
Commit 1b7b9084 authored by Fabio Estevam's avatar Fabio Estevam Committed by Greg Kroah-Hartman
Browse files

iio: adc: ti-ads124s08: Use gpiod_set_value_cansleep()


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: e717f8c6 ("iio: adc: Add the TI ads124s08 ADC code")
Signed-off-by: default avatarFabio Estevam <festevam@gmail.com>
Link: https://patch.msgid.link/20241122164308.390340-1-festevam@gmail.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2d72fc4a
No related branches found
No related tags found
1 merge request!185🤖 Sync Bot: Update v5.10-ktn to Latest Stable Kernel (v5.10.234)
...@@ -184,9 +184,9 @@ static int ads124s_reset(struct iio_dev *indio_dev) ...@@ -184,9 +184,9 @@ static int ads124s_reset(struct iio_dev *indio_dev)
struct ads124s_private *priv = iio_priv(indio_dev); struct ads124s_private *priv = iio_priv(indio_dev);
if (priv->reset_gpio) { if (priv->reset_gpio) {
gpiod_set_value(priv->reset_gpio, 0); gpiod_set_value_cansleep(priv->reset_gpio, 0);
udelay(200); udelay(200);
gpiod_set_value(priv->reset_gpio, 1); gpiod_set_value_cansleep(priv->reset_gpio, 1);
} else { } else {
return ads124s_write_cmd(indio_dev, ADS124S08_CMD_RESET); return ads124s_write_cmd(indio_dev, ADS124S08_CMD_RESET);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment