summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2016-01-12 14:42:37 +0800
committerHans de Goede <hdegoede@redhat.com>2016-01-26 16:20:05 +0100
commit3517a27ddb1d12154e263a4f0bf91b4b76c21536 (patch)
treeadab661007148d024d556fb5d5eef791de3784e0 /board
parentc2caf65da5d15f8e21a4438104360caa8fbb6b7f (diff)
downloadu-boot-imx-3517a27ddb1d12154e263a4f0bf91b4b76c21536.zip
u-boot-imx-3517a27ddb1d12154e263a4f0bf91b4b76c21536.tar.gz
u-boot-imx-3517a27ddb1d12154e263a4f0bf91b4b76c21536.tar.bz2
power: axp: merge separate DLDO functions into 1
Instead of one function for each DLDO regulator, make 1 function that takes an extra "index". Since the control bits for the DLDO regulators are contiguous, this makes the function very simple. This removes a lot of duplicate code. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'board')
-rw-r--r--board/sunxi/board.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 1cc39e4..958f5c5 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -466,10 +466,10 @@ void sunxi_board_init(void)
#endif
#ifdef CONFIG_AXP221_POWER
- power_failed |= axp_set_dldo1(CONFIG_AXP_DLDO1_VOLT);
- power_failed |= axp_set_dldo2(CONFIG_AXP_DLDO2_VOLT);
- power_failed |= axp_set_dldo3(CONFIG_AXP_DLDO3_VOLT);
- power_failed |= axp_set_dldo4(CONFIG_AXP_DLDO4_VOLT);
+ power_failed |= axp_set_dldo(1, CONFIG_AXP_DLDO1_VOLT);
+ power_failed |= axp_set_dldo(2, CONFIG_AXP_DLDO2_VOLT);
+ power_failed |= axp_set_dldo(3, CONFIG_AXP_DLDO3_VOLT);
+ power_failed |= axp_set_dldo(4, CONFIG_AXP_DLDO4_VOLT);
power_failed |= axp_set_eldo(1, CONFIG_AXP_ELDO1_VOLT);
power_failed |= axp_set_eldo(2, CONFIG_AXP_ELDO2_VOLT);
power_failed |= axp_set_eldo(3, CONFIG_AXP_ELDO3_VOLT);