iio: hi8435: Use gpiod_set_value_cansleep()
PATCH 1/1 iio: hi8435: Use gpiod_set_value_cansleep()
Use gpiod_set_value_cansleep() instead of gpiod_set_value() to support the case when reset pin is connected to a GPIO expander. See ZII VF610 SCU4 AIB for one such example.
Signed-off-by Andrey Smirnov <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Chris Healy <[email protected]>
--- drivers/iio/adc/hi8435.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/adc/hi8435.c +1 -1
@@ -477,7 +477,7 @@ static int hi8435_probe(struct spi_device *spi)hi8435_writeb (priv,HI8435_CTRL_REG ,0 ); }else {udelay (5 ); -gpiod_set_value (reset_gpio,1 ); +gpiod_set_value_cansleep (reset_gpio,1 ); }spi_set_drvdata (spi, idev);
Signature · 1 line
2.21.0
Jonathan Cameron
maintainer+CC Nikita, Valdimir.
Quoted 9 lines · On Sat, 10 Aug 2019 22:45:11 -0700 Andrey Smirnov <[email protected]>…
Use
gpiod_set_value_cansleep()instead ofgpiod_set_value()to support the case when reset pin is connected to a GPIO expander. See ZII VF610 SCU4 AIB for one such example.Signed-off-by Andrey Smirnov <[email protected]>Cc Jonathan Cameron <[email protected]>Cc Chris Healy <[email protected]>
Seems sensible to me so I've applied it to the togreg branch of iio.git and pushed out as testing for the autobuilder to play with it.
Still time for last minute comments if anyone has them though.
Thanks,
Jonathan
Quoted 17 lines
--- drivers/iio/adc/hi8435.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iio/adc/hi8435.c +1
-1@@ -477,7 +477,7 @@ static int hi8435_probe(struct spi_device *spi)hi8435_writeb (priv,HI8435_CTRL_REG ,0 ); }else {udelay (5 ); -gpiod_set_value (reset_gpio,1 ); +gpiod_set_value_cansleep (reset_gpio,1 ); }spi_set_drvdata (spi, idev);