WM831X:enable battery FET
authorroot <root@lw.(none)>
Wed, 27 Jul 2011 14:37:54 +0000 (22:37 +0800)
committerroot <root@lw.(none)>
Wed, 27 Jul 2011 14:55:18 +0000 (22:55 +0800)
arch/arm/mach-rk29/board-rk29-a22.c
arch/arm/mach-rk29/board-rk29-phonesdk.c

index 50b20aa1059347c29f3f8b0e8617befefc3111fc..9a931e5c498da1094a6556033b9d058a38a9aee1 100755 (executable)
@@ -633,6 +633,12 @@ int wm831x_pre_init(struct wm831x *parm)
        //ILIM = 900ma
        ret = wm831x_reg_read(parm, WM831X_POWER_STATE) & 0xffff;
        wm831x_reg_write(parm, WM831X_POWER_STATE, (ret&0xfff8) | 0x04);        
+
+       //BATT_FET_ENA = 1
+       wm831x_set_bits(parm, WM831X_RESET_CONTROL,0x1000,0x1000);
+       ret = wm831x_reg_read(parm, WM831X_RESET_CONTROL) & 0xffff;
+       printk("%s:WM831X_RESET_CONTROL=0x%x\n",__FUNCTION__,ret);
+       
 #if 0
        wm831x_set_bits(parm, WM831X_LDO_ENABLE, (1 << 3), 0);
        wm831x_set_bits(parm, WM831X_LDO_ENABLE, (1 << 7), 0);
index 63ef9b0b39f695e528e153fb47bfff153ae2be75..2ec87a2796bfa533c841b00e49d1e4d34bbaa8a7 100755 (executable)
@@ -693,6 +693,12 @@ int wm831x_pre_init(struct wm831x *parm)
        //ILIM = 900ma
        ret = wm831x_reg_read(parm, WM831X_POWER_STATE) & 0xffff;
        wm831x_reg_write(parm, WM831X_POWER_STATE, (ret&0xfff8) | 0x04);        
+       
+       //BATT_FET_ENA = 1
+       wm831x_set_bits(parm, WM831X_RESET_CONTROL,0x1000,0x1000);
+       ret = wm831x_reg_read(parm, WM831X_RESET_CONTROL) & 0xffff;
+       printk("%s:WM831X_RESET_CONTROL=0x%x\n",__FUNCTION__,ret);
+       
 #if 0
        wm831x_set_bits(parm, WM831X_LDO_ENABLE, (1 << 3), 0);
        wm831x_set_bits(parm, WM831X_LDO_ENABLE, (1 << 7), 0);