diff options
Diffstat (limited to 'drivers/iio/adc/max1027.c')
-rw-r--r-- | drivers/iio/adc/max1027.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c index 66a040cbee35..fe5e9f95174b 100644 --- a/drivers/iio/adc/max1027.c +++ b/drivers/iio/adc/max1027.c @@ -303,10 +303,6 @@ static int max1027_read_single_value(struct iio_dev *indio_dev, return -EBUSY; } - ret = max1027_enable_trigger(indio_dev, false); - if (ret) - return ret; - /* Configure conversion register with the requested chan */ st->reg = MAX1027_CONV_REG | MAX1027_CHAN(chan->channel) | MAX1027_NOSCAN; @@ -558,6 +554,11 @@ static int max1027_probe(struct spi_device *spi) return ret; } + /* Assume conversion on register write for now */ + ret = max1027_enable_trigger(indio_dev, false); + if (ret) + return ret; + return devm_iio_device_register(&spi->dev, indio_dev); } |