Having a linear_min_sel setting means the first linear_min_sel selectors are
invalid. We need to subtract linear_min_sel when use n_voltages to determinate
if regulator can change voltage.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
if (rdev->constraints &&
rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE &&
- rdev->desc->n_voltages > 1)
+ (rdev->desc->n_voltages - rdev->desc->linear_min_sel) > 1)
return 1;
return 0;