aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntti Keränen <[email protected]>2021-07-08 12:54:29 +0300
committerJonathan Cameron <[email protected]>2021-07-17 18:41:04 +0100
commit7e77ef8b8d600cf8448a2bbd32f682c28884551f (patch)
treefe91999a8e393f58a45c5011d8d629bfeb831264
parent9898cb24e454602beb6e17bacf9f97b26c85c955 (diff)
iio: adis: set GPIO reset pin direction
Set reset pin direction to output as the reset pin needs to be an active low output pin. Co-developed-by: Hannu Hartikainen <[email protected]> Signed-off-by: Hannu Hartikainen <[email protected]> Signed-off-by: Antti Keränen <[email protected]> Reviewed-by: Nuno Sá <[email protected]> Fixes: ecb010d44108 ("iio: imu: adis: Refactor adis_initial_startup") Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
-rw-r--r--drivers/iio/imu/adis.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
index a5b421f42287..b9a06ca29bee 100644
--- a/drivers/iio/imu/adis.c
+++ b/drivers/iio/imu/adis.c
@@ -411,12 +411,11 @@ int __adis_initial_startup(struct adis *adis)
int ret;
/* check if the device has rst pin low */
- gpio = devm_gpiod_get_optional(&adis->spi->dev, "reset", GPIOD_ASIS);
+ gpio = devm_gpiod_get_optional(&adis->spi->dev, "reset", GPIOD_OUT_HIGH);
if (IS_ERR(gpio))
return PTR_ERR(gpio);
if (gpio) {
- gpiod_set_value_cansleep(gpio, 1);
msleep(10);
/* bring device out of reset */
gpiod_set_value_cansleep(gpio, 0);