diff options
author | Nishad Kamdar <nishadkamdar@gmail.com> | 2018-11-09 13:07:18 +0530 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-11-11 15:29:50 +0000 |
commit | 72e3a5248da9046d17aec9366976a3ec45ceeb3c (patch) | |
tree | 2d5a032d483b2293d5890b87fe424f2e8c4fcd87 /drivers/staging/iio | |
parent | 06c77f564ddb6a3f4a2553c02c36d62cc1a596f7 (diff) | |
download | linux-72e3a5248da9046d17aec9366976a3ec45ceeb3c.tar.gz linux-72e3a5248da9046d17aec9366976a3ec45ceeb3c.tar.bz2 linux-72e3a5248da9046d17aec9366976a3ec45ceeb3c.zip |
staging: iio: ad7816: Set RD/WR pin and CONVST pin as outputs.
The RD/WR pin and CONVST pin are logical inputs to the AD78xx
chip as per the datasheet. Hence convert them to outputs.
Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/staging/iio')
-rw-r--r-- | drivers/staging/iio/adc/ad7816.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c index 3cda5cd09365..a2fead85cd46 100644 --- a/drivers/staging/iio/adc/ad7816.c +++ b/drivers/staging/iio/adc/ad7816.c @@ -369,14 +369,15 @@ static int ad7816_probe(struct spi_device *spi_dev) chip->oti_data[i] = 203; chip->id = spi_get_device_id(spi_dev)->driver_data; - chip->rdwr_pin = devm_gpiod_get(&spi_dev->dev, "rdwr", GPIOD_IN); + chip->rdwr_pin = devm_gpiod_get(&spi_dev->dev, "rdwr", GPIOD_OUT_HIGH); if (IS_ERR(chip->rdwr_pin)) { ret = PTR_ERR(chip->rdwr_pin); dev_err(&spi_dev->dev, "Failed to request rdwr GPIO: %d\n", ret); return ret; } - chip->convert_pin = devm_gpiod_get(&spi_dev->dev, "convert", GPIOD_IN); + chip->convert_pin = devm_gpiod_get(&spi_dev->dev, "convert", + GPIOD_OUT_HIGH); if (IS_ERR(chip->convert_pin)) { ret = PTR_ERR(chip->convert_pin); dev_err(&spi_dev->dev, "Failed to request convert GPIO: %d\n", |