[U-Boot] [PATCH v2 2/6] dm: adc: uclass: get reference regulator once

Simon Glass sjg at chromium.org
Wed Jul 25 02:45:27 UTC 2018


On 24 July 2018 at 08:31, Fabrice Gasnier <fabrice.gasnier at st.com> wrote:
> 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 at st.com>
> ---
>
> Changes in v2:
> - move device_get_supply_regulator() call to pre_probe() routine
>
> ---
>  drivers/adc/adc-uclass.c | 35 +++++++++++++++++------------------
>  1 file changed, 17 insertions(+), 18 deletions(-)

I think this looks right.

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list