The driver skips hardware initialization if it is already configured by
the earlier bootloader stage (BL30). Skip the initialization only if the
hardware is really initialized and enabled.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I3e2e2d270ad3e7e7f38e2bc3ce2a924a47b164af
* reading the temperature sensor.
*/
regmap_read(priv->regmap, MESON_SAR_ADC_REG3, ®val);
- if (regval & MESON_SAR_ADC_REG3_BL30_INITIALIZED)
- return 0;
+ if (regval & MESON_SAR_ADC_REG3_BL30_INITIALIZED) {
+ regmap_read(priv->regmap, MESON_SAR_ADC_REG3, ®val);
+ if (regval & MESON_SAR_ADC_REG3_ADC_EN)
+ return 0;
+ }
meson_saradc_stop_sample_engine(priv);