misc:pmic:samsung Convert TRATS target to use MAX8997 instead of MAX8998
authorŁukasz Majewski <l.majewski@samsung.com>
Thu, 29 Mar 2012 01:29:18 +0000 (01:29 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Tue, 15 May 2012 06:31:29 +0000 (08:31 +0200)
TRATS target uses MAX8997 PMIC device instead of MAX8998.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Minkyu Kang <mk7.kang@samsung.com>
board/samsung/trats/trats.c
include/configs/trats.h

index aa4291df4aba82a484172b507646d15abf24d099..a7b4e4a4f99e02770d0632fe5ad94c955d4cd8c6 100644 (file)
@@ -32,7 +32,7 @@
 #include <asm/arch/power.h>
 #include <pmic.h>
 #include <usb/s3c_udc.h>
-#include <max8998_pmic.h>
+#include <max8997_pmic.h>
 
 #include "setup.h"
 
@@ -216,26 +216,19 @@ static int s5pc210_phy_control(int on)
                return -1;
 
        if (on) {
-               ret |= pmic_set_output(p,
-                                      MAX8998_REG_BUCK_ACTIVE_DISCHARGE3,
-                                      MAX8998_SAFEOUT1, LDO_ON);
-               ret |= pmic_set_output(p, MAX8998_REG_ONOFF1,
-                                     MAX8998_LDO3, LDO_ON);
-               ret |= pmic_set_output(p, MAX8998_REG_ONOFF2,
-                                     MAX8998_LDO8, LDO_ON);
-
+               ret |= pmic_set_output(p, MAX8997_REG_SAFEOUTCTRL,
+                                     ENSAFEOUT1, LDO_ON);
+               ret |= pmic_reg_write(p, MAX8997_REG_LDO3CTRL, EN_LDO);
+               ret |= pmic_reg_write(p, MAX8997_REG_LDO8CTRL, EN_LDO);
        } else {
-               ret |= pmic_set_output(p, MAX8998_REG_ONOFF2,
-                                     MAX8998_LDO8, LDO_OFF);
-               ret |= pmic_set_output(p, MAX8998_REG_ONOFF1,
-                                     MAX8998_LDO3, LDO_OFF);
-               ret |= pmic_set_output(p,
-                                      MAX8998_REG_BUCK_ACTIVE_DISCHARGE3,
-                                      MAX8998_SAFEOUT1, LDO_OFF);
+               ret |= pmic_reg_write(p, MAX8997_REG_LDO8CTRL, DIS_LDO);
+               ret |= pmic_reg_write(p, MAX8997_REG_LDO3CTRL, DIS_LDO);
+               ret |= pmic_set_output(p, MAX8997_REG_SAFEOUTCTRL,
+                                     ENSAFEOUT1, LDO_OFF);
        }
 
        if (ret) {
-               puts("MAX8998 LDO setting error!\n");
+               puts("MAX8997 LDO setting error!\n");
                return -1;
        }
 
index 674bc7194d8e2384e22bfe71ee3a9400678ab003..1bc2bb212e50d876ae9a1eb1c28cbd00e97a1b72 100644 (file)
 
 #define CONFIG_PMIC
 #define CONFIG_PMIC_I2C
-#define CONFIG_PMIC_MAX8998
+#define CONFIG_PMIC_MAX8997
 
 #define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_S3C_UDC_OTG