Commit 92919679 authored by Matti Vaittinen's avatar Matti Vaittinen Committed by Mark Brown

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: 60ab7f41 ("regulator: use linear_ranges helper")
Signed-off-by: default avatarMatti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Link: https://lore.kernel.org/r/20200612090225.GA3243@localhost.localdomainSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent d7442ba1
...@@ -486,7 +486,7 @@ int regulator_map_voltage_pickable_linear_range(struct regulator_dev *rdev, ...@@ -486,7 +486,7 @@ int regulator_map_voltage_pickable_linear_range(struct regulator_dev *rdev,
continue; continue;
} }
ret = selector + sel; ret = selector + sel - range->min_sel;
voltage = rdev->desc->ops->list_voltage(rdev, ret); voltage = rdev->desc->ops->list_voltage(rdev, ret);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment