regulator: Fix voltage range selection
Use the correct field to fix wrong voltage range selection on regulators
such as tps6287x since the blamed commit.
Fixes: 269cb04b60
("regulator: Use bitfield values for range selectors")
Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Link: https://lore.kernel.org/r/20230911-regulator-voltage-sel-v1-1-886eb1ade8d8@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
0bb80ecc33
commit
6223e073db
@ -197,7 +197,7 @@ int regulator_set_voltage_sel_pickable_regmap(struct regulator_dev *rdev,
|
||||
sel += rdev->desc->linear_ranges[i].min_sel;
|
||||
|
||||
range = rdev->desc->linear_range_selectors_bitfield[i];
|
||||
range <<= ffs(rdev->desc->vsel_mask) - 1;
|
||||
range <<= ffs(rdev->desc->vsel_range_mask) - 1;
|
||||
|
||||
if (rdev->desc->vsel_reg == rdev->desc->vsel_range_reg) {
|
||||
ret = regmap_update_bits(rdev->regmap,
|
||||
|
Loading…
Reference in New Issue
Block a user