regulator: Fix pickable ranges mapping
PATCH 1/1 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.
---
I noticed BD71847 voltage changes for BUCK3 did not work as expected. Setting voltage to 1050000 did not work even though this should be supported. It appears I broke pickable-ranges support with linear_ranges change. I expect the MAX77650 and BD71847/BD71850 to be broken.
drivers/regulator/helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/helpers.c +1 -1
@@ -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);
base-commit: 0b0c0bd818ef76a20f58c3cb1ac96a3056ccb681
Signature · 14 lines
2.21.0 -- Matti Vaittinen, Linux device drivers ROHM Semiconductors, Finland SWDC Kiviharjunlenkki 1E 90220 OULU FINLAND ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~ Simon says - in Latin please. ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~ Thanks to Simon Glass for the translation =]
Mark Brown
maintainerQuoted 3 lines · Matti Vaittinen
Pickable ranges mapping function never used range min selector. Thus existing drivers broke when proper
linear_rangesfunctionality was taken in use. Fix this for now just by ignoring the minimum selector.
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git for-next
Thanks!
[1/1] regulator: Fix pickable ranges mapping
commit: 92919679d31721381e3c376488477efe49b915f3
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark