* [PATCH] regulator: Fix voltage range selection
@ 2023-09-11 12:42 Vincent Whitchurch
0 siblings, 0 replies; only message in thread
From: Vincent Whitchurch @ 2023-09-11 12:42 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Chen-Yu Tsai
Cc: linux-kernel, kernel, Vincent Whitchurch
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>
---
drivers/regulator/helpers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/helpers.c b/drivers/regulator/helpers.c
index 5ad5f3b3a6b5..d49268336553 100644
--- 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,
---
base-commit: 0bb80ecc33a8fb5a682236443c1e740d5c917d1d
change-id: 20230911-regulator-voltage-sel-5c10d1cd0270
Best regards,
--
Vincent Whitchurch <vincent.whitchurch@axis.com>
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-09-11 12:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-11 12:42 [PATCH] regulator: Fix voltage range selection Vincent Whitchurch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).