drivers: regulator: npm6001: handle LDO0 set voltage correctly
Even if the regulator is fixed, allow valid voltage input (1.8V). Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
240be492fa
commit
0c28da26ba
1 changed files with 4 additions and 1 deletions
|
@ -383,7 +383,10 @@ static int regulator_npm6001_set_voltage(const struct device *dev,
|
|||
case NPM6001_SOURCE_LDO0:
|
||||
return regulator_npm6001_ldo0_set_voltage(dev, min_uv, max_uv);
|
||||
case NPM6001_SOURCE_LDO1:
|
||||
return -ENOTSUP;
|
||||
if ((min_uv != 1800000) && (max_uv != 1800000)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
__ASSERT(NULL, "Unexpected source");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue