mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 18:04:48 +00:00
adc: Allow use of adc with DM_REGULATOR disabled
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@kwiboo.se> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
This commit is contained in:
parent
d1c38bb4a8
commit
bcbfd1bb37
1 changed files with 2 additions and 2 deletions
|
@ -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. */
|
||||
|
|
Loading…
Add table
Reference in a new issue