Commit 1164c546 authored by Sven Schwermer's avatar Sven Schwermer Committed by Tom Rini

regulator: Allow autosetting fixed regulators

Fixed regulators don't have a set_value method. Therefore, trying to
set their value will always return -ENOSYS.
Signed-off-by: default avatarSven Schwermer <>
Cc: Jaehoon Chung <>
Cc: Peng Fan <>
Reviewed-by: default avatarSimon Glass <>
parent 5fc7cf8c
......@@ -238,6 +238,9 @@ int regulator_autoset(struct udevice *dev)
if (!uc_pdata->always_on && !uc_pdata->boot_on)
if (uc_pdata->type == REGULATOR_TYPE_FIXED)
return regulator_set_enable(dev, true);
if (uc_pdata->flags & REGULATOR_FLAG_AUTOSET_UV)
ret = regulator_set_value(dev, uc_pdata->min_uV);
if (!ret && (uc_pdata->flags & REGULATOR_FLAG_AUTOSET_UA))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment