Patchwork [U-Boot,v7,25/26] arm:goni:pmic: Adjust GONI target platform board to new PMIC framework

login
register
mail settings
Submitter Łukasz Majewski
Date Nov. 13, 2012, 1:22 p.m.
Message ID <1352812937-15998-26-git-send-email-l.majewski@samsung.com>
Download mbox | patch
Permalink /patch/198668/
State Accepted
Delegated to: Anatolij Gustschin
Headers show

Comments

Łukasz Majewski - Nov. 13, 2012, 1:22 p.m.
Move pmic_init() function call from board_init() to power_init_board()
to work with new PMIC/POWER framework.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
---
Changes for v5:
- New patch at v5.
Changes for v6:
- None
Changes for v7:
- Check pmic_init() return value
---
 board/samsung/goni/goni.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

Patch

diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c
index 50e9210..ff76963 100644
--- a/board/samsung/goni/goni.c
+++ b/board/samsung/goni/goni.c
@@ -41,9 +41,16 @@  int board_init(void)
 	gd->bd->bi_arch_number = MACH_TYPE_GONI;
 	gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
-#if defined(CONFIG_POWER)
-	pmic_init(I2C_5);
-#endif
+	return 0;
+}
+
+int power_init_board(void)
+{
+	int ret;
+
+	ret = pmic_init(I2C_5);
+	if (ret)
+		return ret;
 
 	return 0;
 }