drivers: regulator: common: fix is_supported_voltage comparison
The edge voltages within a range need to be included as part of the supported comparison. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
7eb97639ef
commit
491a132369
|
@ -148,7 +148,7 @@ bool regulator_is_supported_voltage(const struct device *dev, int32_t min_uv,
|
|||
|
||||
(void)regulator_list_voltage(dev, idx, &volt_uv);
|
||||
|
||||
if ((volt_uv > min_uv) && (volt_uv < max_uv)) {
|
||||
if ((volt_uv >= min_uv) && (volt_uv <= max_uv)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue