[PATCH 6/8] adc: Allow use of adc with DM_REGULATOR disabled
Kever Yang
kever.yang at rock-chips.com
Fri Oct 25 14:35:57 CEST 2024
On 2024/10/18 04:00, Jonas Karlman wrote:
> When DM_REGULATOR=n is used the device_get_supply_regulator() function
> always return -ENOSYS.
>
> Change to treat missing support for regulators as a missing optional
> vdd/vss-supply regulator to reduce error messages being logged.
>
> Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
Reviewed-by: Kever Yang <kever.yang at rock-chips.com>
Thanks,
- Kever
> ---
> drivers/adc/adc-uclass.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/adc/adc-uclass.c b/drivers/adc/adc-uclass.c
> index 16600be821c9..b02430eb7d7f 100644
> --- a/drivers/adc/adc-uclass.c
> +++ b/drivers/adc/adc-uclass.c
> @@ -382,7 +382,7 @@ static int adc_vdd_plat_set(struct udevice *dev)
> if (!ret)
> return adc_vdd_plat_update(dev);
>
> - if (ret != -ENOENT)
> + if (ret != -ENOSYS && ret != -ENOENT)
> return ret;
>
> /* No vdd-supply phandle. */
> @@ -406,7 +406,7 @@ static int adc_vss_plat_set(struct udevice *dev)
> if (!ret)
> return adc_vss_plat_update(dev);
>
> - if (ret != -ENOENT)
> + if (ret != -ENOSYS && ret != -ENOENT)
> return ret;
>
> /* No vss-supply phandle. */
More information about the U-Boot
mailing list