]> git.baikalelectronics.ru Git - kernel.git/commit
iio: adc: meson-saradc: initialize the bandgap correctly on older SoCs
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Tue, 31 Oct 2017 20:01:44 +0000 (21:01 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 2 Dec 2017 11:15:14 +0000 (11:15 +0000)
commit3ee379826a70f9ed6667e35c54c6955d2df61172
tree2dc3a2851c152dac68e9648207085ff11a311d69
parent7148bcdf5e2cac0ccfa69c9480d41111a564118f
iio: adc: meson-saradc: initialize the bandgap correctly on older SoCs

Meson8 and Meson8b do not have the MESON_SAR_ADC_REG11 register. The
bandgap setting for these SoCs is configured in the
MESON_SAR_ADC_DELTA_10 register instead.
Make the driver aware of this difference and use the correct bandgap
register depending on the SoC.
This has worked fine on Meson8 and Meson8b because the bootloader is
already initializing the bandgap setting.

Fixes: 4356b2f1a541 ("iio: adc: meson-saradc: add Meson8b SoC compatibility")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/meson_saradc.c