Commit 7e77ef8b authored by Antti Keränen's avatar Antti Keränen Committed by Jonathan Cameron

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: default avatarHannu Hartikainen <hannu@hrtk.in>
Signed-off-by: default avatarHannu Hartikainen <hannu@hrtk.in>
Signed-off-by: default avatarAntti Keränen <detegr@rbx.email>
Reviewed-by: default avatarNuno Sá <nuno.sa@analog.com>
Fixes: ecb010d4 ("iio: imu: adis: Refactor adis_initial_startup")
Link: https://lore.kernel.org/r/20210708095425.13295-1-detegr@rbx.email
Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 9898cb24
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment