diff options
author | Paul Cercueil <paul.cercueil@analog.com> | 2019-11-15 14:57:21 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-11-16 18:06:10 +0100 |
commit | 260442cc5be4e652628f01ea6ac58f542e2c8e7a (patch) | |
tree | af3b8084491889f2a8458fd5d03c4a7a1534058c /drivers/iio/adc/ad7091r-base.h | |
parent | iio: adc: Add support for AD7091R5 ADC (diff) | |
download | linux-260442cc5be4e652628f01ea6ac58f542e2c8e7a.tar.xz linux-260442cc5be4e652628f01ea6ac58f542e2c8e7a.zip |
iio: adc: ad7091r5: Add scale and external VREF support
The scale can now be obtained with the "in_voltage_scale" file.
By default, the scale returned corresponds to the internal VREF of 2.5V.
It is possible to use an external VREF (through the REFIN/REFOUT pin of
the chip), by passing a regulator to the driver. The scale will then be
calculated according to the voltage reported by the regulator.
Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Co-developed-by: Beniamin Bia <beniamin.bia@analog.com>
Signed-off-by: Beniamin Bia <beniamin.bia@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/ad7091r-base.h')
-rw-r--r-- | drivers/iio/adc/ad7091r-base.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/adc/ad7091r-base.h b/drivers/iio/adc/ad7091r-base.h index b0b4fe01a681..509748aef9b1 100644 --- a/drivers/iio/adc/ad7091r-base.h +++ b/drivers/iio/adc/ad7091r-base.h @@ -14,6 +14,7 @@ struct ad7091r_state; struct ad7091r_chip_info { unsigned int num_channels; const struct iio_chan_spec *channels; + unsigned int vref_mV; }; extern const struct regmap_config ad7091r_regmap_config; |