Skip to content

Commit 7e77ef8

Browse files
Detegrjic23
authored andcommitted
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: ecb010d ("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]>
1 parent 9898cb2 commit 7e77ef8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/iio/imu/adis.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,12 +411,11 @@ int __adis_initial_startup(struct adis *adis)
411411
int ret;
412412

413413
/* check if the device has rst pin low */
414-
gpio = devm_gpiod_get_optional(&adis->spi->dev, "reset", GPIOD_ASIS);
414+
gpio = devm_gpiod_get_optional(&adis->spi->dev, "reset", GPIOD_OUT_HIGH);
415415
if (IS_ERR(gpio))
416416
return PTR_ERR(gpio);
417417

418418
if (gpio) {
419-
gpiod_set_value_cansleep(gpio, 1);
420419
msleep(10);
421420
/* bring device out of reset */
422421
gpiod_set_value_cansleep(gpio, 0);

0 commit comments

Comments
 (0)