diff mbox

[U-Boot,v2,4/6] sunxi: fix an error when setting DLDO on AXP818

Message ID 20170225235208.50886-4-icenowy@aosc.xyz
State Rejected
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Commit Message

Icenowy Zheng Feb. 25, 2017, 11:52 p.m. UTC
The driver of AXP818 PMIC have a serious bug when setting DLDOs' voltage
-- the register offset of ELDO is wrongly used instead of DLDO.

Fix this problem.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
---
 drivers/power/axp818.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chen-Yu Tsai Feb. 27, 2017, 3:40 a.m. UTC | #1
On Sun, Feb 26, 2017 at 7:52 AM, Icenowy Zheng <icenowy@aosc.xyz> wrote:
> The driver of AXP818 PMIC have a serious bug when setting DLDOs' voltage
> -- the register offset of ELDO is wrongly used instead of DLDO.
>
> Fix this problem.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>

Reviewed-by: Chen-Yu Tsai <wens@csie.org>
diff mbox

Patch

diff --git a/drivers/power/axp818.c b/drivers/power/axp818.c
index af4d7a6903..ad0c330ca5 100644
--- a/drivers/power/axp818.c
+++ b/drivers/power/axp818.c
@@ -162,7 +162,7 @@  int axp_set_dldo(int dldo_num, unsigned int mvolt)
 	cfg = axp818_mvolt_to_cfg(mvolt, 700, 3300, 100);
 	if (dldo_num == 2 && mvolt > 3300)
 		cfg += 1 + axp818_mvolt_to_cfg(mvolt, 3400, 4200, 200);
-	ret = pmic_bus_write(AXP818_ELDO1_CTRL + (dldo_num - 1), cfg);
+	ret = pmic_bus_write(AXP818_DLDO1_CTRL + (dldo_num - 1), cfg);
 	if (ret)
 		return ret;