projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bb80ec
)
regulator: Fix voltage range selection
author
Vincent Whitchurch
<vincent.whitchurch@axis.com>
Mon, 11 Sep 2023 12:42:47 +0000
(14:42 +0200)
committer
Mark Brown
<broonie@kernel.org>
Mon, 11 Sep 2023 12:51:36 +0000
(13:51 +0100)
Use the correct field to fix wrong voltage range selection on regulators
such as tps6287x since the blamed commit.
Fixes: 269cb04b601d ("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>
drivers/regulator/helpers.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/helpers.c
b/drivers/regulator/helpers.c
index 5ad5f3b3a6b5d8fc91f1ea2e689a65fc087740be..d4926833655327d6a3494a5b6865087df80ad36d 100644
(file)
--- a/
drivers/regulator/helpers.c
+++ b/
drivers/regulator/helpers.c
@@
-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,