]> git.dujemihanovic.xyz Git - u-boot.git/commit
regulator: rk8xx: Return correct voltage for buck converters
authorJoseph Chen <chenjh@rock-chips.com>
Mon, 21 Aug 2023 22:30:25 +0000 (22:30 +0000)
committerKever Yang <kever.yang@rock-chips.com>
Sat, 7 Oct 2023 08:49:41 +0000 (16:49 +0800)
commit04c38c6c4936f353de36be60655f402922292a37
treefa34da58563d33b5686305d56c0f40b9236baa3d
parentd99fb64a98af3bebf6b0c134291c4fb89e177aa2
regulator: rk8xx: Return correct voltage for buck converters

Information from the first range group is always used to calculate the
voltage returned for buck converters. This may result in wrong voltage
reported back to the regulator_get_value caller.

Traverse all the possible BUCK ranges to fix this issue.

Fixes: addd062beacc ("power: pmic: rk816: support rk816 pmic")
Fixes: b62280745e55 ("power: pmic: rk805: support rk805 pmic")
Fixes: b4a35574b38d ("power: pmic: rk817: support rk817 pmic")
Fixes: ee30068fa574 ("power: pmic: rk809: support rk809 pmic")
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
[jonas@kwiboo.se: fix checkpatch error, simplify buck get_value, update commit message]
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
drivers/power/regulator/rk8xx.c