iio: adc: stm32-adc: add analog switches supply control
authorFabrice Gasnier <fabrice.gasnier@st.com>
Wed, 3 Jul 2019 10:08:15 +0000 (12:08 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 27 Jul 2019 19:11:16 +0000 (20:11 +0100)
commit3a81bde5457ec3292cf05c83c9a0b731b1b1531e
tree3d4ace16bd8e1001875747f01120dd56808588ed
parenta85a43e04523df3b0f1e5f3100592806e29966a8
iio: adc: stm32-adc: add analog switches supply control

On stm32h7 and stm32mp1, the ADC inputs are multiplexed with analog
switches which have reduced performances when their supply is below 2.7V
(vdda by default):
- 3.3V embedded booster can be used, to get full ADC performances
  (increases power consumption).
- vdd supply can be selected if above 2.7V by setting ANASWVDD syscfg bit,
  on STM32MP1 only.

Make this optional, since this is a trade-off between analog performance
and power consumption.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/stm32-adc-core.c