[PATCH] iio: hi8435: Use gpiod_set_value_cansleep()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <andrew.smirnov@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-iio@xxxxxxxxxxxxxxx
Cc: Jonathan Cameron <jic23@xxxxxxxxxx>
Cc: Chris Healy <cphealy@xxxxxxxxx>
---
 drivers/iio/adc/hi8435.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/hi8435.c b/drivers/iio/adc/hi8435.c
index 35951c47004e..c15f0e154e4d 100644
--- a/drivers/iio/adc/hi8435.c
+++ b/drivers/iio/adc/hi8435.c
@@ -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);
-- 
2.21.0




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux