drivers: regulator: npm6001: handle LDO0 set voltage correctly
Even if the regulator is fixed, allow valid voltage input (1.8V).
@@ -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");
}
