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 <andrew.smirnov@gmail.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-iio@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Chris Healy <cphealy@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Andrey Smirnov 2019-08-10 22:45:11 -07:00 committed by Jonathan Cameron
parent e031d5f558
commit 6822dc9daa
1 changed files with 1 additions and 1 deletions

View File

@ -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);