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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Dec 2017 08:52:49 +0000 (09:52 +0100)
commitb6c6d01a2debe8df9541a9bd21cc60760d20f6a2
tree309ba426e922a23a0da18ffa9d910cc2f221e26f
parentac2d7838808c5bb68ea357f748cc4c1710555d6d
iio: adc: meson-saradc: initialize the bandgap correctly on older SoCs

commit d85eed9f576369bc90322659de96b7dbea1f9a57 upstream.

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: 6c76ed31cd05 ("iio: adc: meson-saradc: add Meson8b SoC compatibility")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/adc/meson_saradc.c