From c7336815078ff3745e3130aeff35991e3e98e61e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Majewski?= Date: Tue, 13 Nov 2012 03:21:55 +0000 Subject: pmic: Extend PMIC framework to support multiple instances of PMIC devices The PMIC framework has been extended to support multiple instances of the variety of devices responsible for power management. This change allows supporting of e.g. fuel gauge, charger, MUIC (Micro USB Interface Circuit). Power related includes have been moved to ./include/power directory. This is a first of a series of patches - in the future "pmic" will be replaced with "power". Two important issues: 1. The PMIC needs to be initialized just after malloc is configured 2. It uses list to hold information about available PMIC devices Signed-off-by: Lukasz Majewski Signed-off-by: Kyungmin Park Cc: Stefano Babic --- board/samsung/goni/goni.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'board/samsung/goni') diff --git a/board/samsung/goni/goni.c b/board/samsung/goni/goni.c index e8fb1ea413..71ed618c6f 100644 --- a/board/samsung/goni/goni.c +++ b/board/samsung/goni/goni.c @@ -25,10 +25,10 @@ #include #include #include -#include +#include #include #include -#include +#include DECLARE_GLOBAL_DATA_PTR; static struct s5pc110_gpio *s5pc110_gpio; @@ -42,8 +42,9 @@ int board_init(void) gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100; #if defined(CONFIG_PMIC) - pmic_init(); + pmic_init(I2C_5); #endif + return 0; } @@ -108,7 +109,9 @@ static int s5pc1xx_phy_control(int on) { int ret; static int status; - struct pmic *p = get_pmic(); + struct pmic *p = pmic_get("MAX8998_PMIC"); + if (!p) + return -ENODEV; if (pmic_probe(p)) return -1; -- cgit v1.2.1