iio: adc: ad7949: add vref selection support
authorLiam Beguin <lvb@xiphos.com>
Sun, 15 Aug 2021 21:33:07 +0000 (17:33 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 14 Sep 2021 11:00:30 +0000 (12:00 +0100)
commit37930650604982930c4f516447f0fb3a61cb647f
treed25ce851b4c5f5dde6abaf183e6d8ba91a59f019
parent0b2a740b424e68e346e3797eaa7c155575ae7c14
iio: adc: ad7949: add vref selection support

Add support for selecting the voltage reference from the devicetree.

This change is required to get valid readings with all three
vref hardware configurations supported by the ADC.

For instance if the ADC isn't provided with an external reference,
the sample request must specify an internal voltage reference to get a
valid reading.

Signed-off-by: Liam Beguin <lvb@xiphos.com>
Link: https://lore.kernel.org/r/20210815213309.2847711-4-liambeguin@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7949.c