regulator: Fix pickable ranges mapping
Pickable ranges mapping function never used range min selector. Thus
existing drivers broke when proper linear_ranges functionality was taken
in use. Fix this for now just by ignoring the minimum selector.
Fixes: 60ab7f4153
("regulator: use linear_ranges helper")
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Link: https://lore.kernel.org/r/20200612090225.GA3243@localhost.localdomain
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
d7442ba13d
commit
92919679d3
@ -486,7 +486,7 @@ int regulator_map_voltage_pickable_linear_range(struct regulator_dev *rdev,
|
||||
continue;
|
||||
}
|
||||
|
||||
ret = selector + sel;
|
||||
ret = selector + sel - range->min_sel;
|
||||
|
||||
voltage = rdev->desc->ops->list_voltage(rdev, ret);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user