diff options
author | Arun Murthy <arun.murthy@stericsson.com> | 2010-04-07 11:02:30 +0530 |
---|---|---|
committer | John Rigby <john.rigby@linaro.org> | 2010-09-02 22:44:56 -0600 |
commit | fe4d68b4f745f9285faff5fe4b22139ec9a93f4e (patch) | |
tree | fb1aefa526a09412d64a784780ac3d519f9a07ec | |
parent | 71c654c0f61b5be42a0f4962d49b29827d027ea6 (diff) |
Set ChVolLevel to 4.2v as the battery can be charged upto 4.2v.
WP256692
Signed-off-by: Arun Murthy <arun.murthy@stericsson.com>
-rwxr-xr-x | arch/arm/mach-ux500/board-mop500.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-ux500/include/mach/ab8500_bm.h | 4 | ||||
-rw-r--r-- | drivers/power/ab8500_bm.c | 9 |
3 files changed, 10 insertions, 5 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index e79efc37871..753dcebb223 100755 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -866,7 +866,7 @@ static struct ab8500_bm_platform_data ab8500_bm_plat_data = { .name = POWER_SUPPLY_TECHNOLOGY_LION, .termination_vol = 4200, .op_cur_lvl = CH_OP_CUR_LVL_0P9, - .ip_vol_lvl = CH_VOL_LVL_4P1, + .ip_vol_lvl = CH_VOL_LVL_4P2, }; static struct platform_device ab8500_bm_device = { diff --git a/arch/arm/mach-ux500/include/mach/ab8500_bm.h b/arch/arm/mach-ux500/include/mach/ab8500_bm.h index 0f2225d09eb..f29a2bfe866 100644 --- a/arch/arm/mach-ux500/include/mach/ab8500_bm.h +++ b/arch/arm/mach-ux500/include/mach/ab8500_bm.h @@ -17,10 +17,12 @@ struct ab8500_bm_platform_data { /* Main charge i/p current */ #define MAIN_CH_IP_CUR_0P9A 0x80 +#define MAIN_CH_IP_CUR_1P1A 0xA0 /* ChVoltLevel */ #define CH_VOL_LVL_3P5 0x00 #define CH_VOL_LVL_4P05 0x16 -#define CH_VOL_LVL_4P1 0x18 +#define CH_VOL_LVL_4P1 0x1B +#define CH_VOL_LVL_4P2 0x25 #define CH_VOL_LVL_4P6 0x4D /* ChOutputCurrentLevel */ diff --git a/drivers/power/ab8500_bm.c b/drivers/power/ab8500_bm.c index 7cef8747de7..19582cbdfe2 100644 --- a/drivers/power/ab8500_bm.c +++ b/drivers/power/ab8500_bm.c @@ -1113,7 +1113,7 @@ static void ab8500_bm_battery_read_status(struct ab8500_bm_device_info *di) * current has to be in the range of 50-200mA */ if (di->charge_status == POWER_SUPPLY_STATUS_CHARGING) { - if (di->voltage_uV > (pdata->termination_vol - 25) && di->voltage_uV < pdata->termination_vol) { + if (di->voltage_uV > (pdata->termination_vol - 100) && di->voltage_uV < pdata->termination_vol) { /* Check if charging is in constant voltage */ val = ab8500_read(AB8500_CHARGER, AB8500_CH_STATUS1_REG); @@ -1385,9 +1385,9 @@ static int ab8500_bm_ac_en(struct ab8500_bm_device_info *di, int enable) dev_vdbg(di->dev, "ab8500_bm_ac_en(): write failed\n"); return ret; } - /* MainChInputCurr = 900mA */ + /* MainChInputCurr = 1.1A */ ret = ab8500_write(AB8500_CHARGER, AB8500_MCH_IPT_CURLVL_REG, - MAIN_CH_IP_CUR_0P9A); + MAIN_CH_IP_CUR_1P1A); if (ret) { dev_vdbg(di->dev, "ab8500_bm_ac_en(): write failed\n"); return ret; @@ -1599,6 +1599,9 @@ static int ab8500_bm_hw_presence_en(struct ab8500_bm_device_info *di, { int val = 0, ret = 0; + /* Set BATOVV to 4.75v */ + ret = ab8500_write(AB8500_CHARGER, AB8500_BATT_OVV, BATT_OVV_TH_4P75); + /* Low Battery Voltage = 3.1v */ val = ab8500_read(AB8500_SYS_CTRL2_BLOCK, AB8500_LOW_BAT_REG); ret = ab8500_write(AB8500_SYS_CTRL2_BLOCK, AB8500_LOW_BAT_REG, |