]> git.baikalelectronics.ru Git - uboot.git/commit
dm: adc: uclass: get reference regulator once
authorFabrice Gasnier <fabrice.gasnier@st.com>
Tue, 24 Jul 2018 14:31:29 +0000 (16:31 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 3 Aug 2018 23:53:10 +0000 (19:53 -0400)
commitf58e78487b931805c53adc34ec9d66f3f48677ea
tree10341dda7a485f854266d5921a9536db680d0460
parent8c45679a3572bb61f1e05dc95faefcb1af559817
dm: adc: uclass: get reference regulator once

device_get_supply_regulator() only needs to be called once.
But each time there's call to adc_vxx_value() for instance, it calls
adc_vxx_platdata_update() -> device_get_supply_regulator().

So, move device_get_supply_regulator() to pre_probe() routine.

This also allows vdd_supply/vss_supply to be provided directly from
uc_pdata, e.g dt-binding variant like stm32-adc provide its own
'vref-supply'.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/adc/adc-uclass.c