aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/ab8500_charger.c
diff options
context:
space:
mode:
authorJonas Aaberg <jonas.aberg@stericsson.com>2012-05-11 06:42:25 -0400
committerLee Jones <lee.jones@linaro.org>2013-01-23 09:39:20 -0500
commit0ed5107fa86013c91b1752230d44b79dffee0cda (patch)
tree5e7102658eb34811560f43cabebf6d9eb5b8cb02 /drivers/power/ab8500_charger.c
parent1a793a10899487d40ac3071f52a6e231260d935d (diff)
ab8500-charger: Do not touch VBUSOVV bits
Do not touch the VBUSOVV in USBCHTRL2 when running on AB8505. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com> Tested-by: Mian Yousaf KAUKAB <mian.yousaf.kaukab@stericsson.com>
Diffstat (limited to 'drivers/power/ab8500_charger.c')
-rw-r--r--drivers/power/ab8500_charger.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c
index a632b94e38b9..871bf5a7c42a 100644
--- a/drivers/power/ab8500_charger.c
+++ b/drivers/power/ab8500_charger.c
@@ -2671,13 +2671,23 @@ static int ab8500_charger_init_hw_registers(struct ab8500_charger *di)
2671 } 2671 }
2672 } 2672 }
2673 2673
2674 /* VBUS OVV set to 6.3V and enable automatic current limitiation */ 2674 if (is_ab9540_2p0(di->parent) || is_ab8505_2p0(di->parent))
2675 ret = abx500_set_register_interruptible(di->dev, 2675 ret = abx500_mask_and_set_register_interruptible(di->dev,
2676 AB8500_CHARGER, 2676 AB8500_CHARGER,
2677 AB8500_USBCH_CTRL2_REG, 2677 AB8500_USBCH_CTRL2_REG,
2678 VBUS_OVV_SELECT_6P3V | VBUS_AUTO_IN_CURR_LIM_ENA); 2678 VBUS_AUTO_IN_CURR_LIM_ENA,
2679 VBUS_AUTO_IN_CURR_LIM_ENA);
2680 else
2681 /*
2682 * VBUS OVV set to 6.3V and enable automatic current limitation
2683 */
2684 ret = abx500_set_register_interruptible(di->dev,
2685 AB8500_CHARGER,
2686 AB8500_USBCH_CTRL2_REG,
2687 VBUS_OVV_SELECT_6P3V | VBUS_AUTO_IN_CURR_LIM_ENA);
2679 if (ret) { 2688 if (ret) {
2680 dev_err(di->dev, "failed to set VBUS OVV\n"); 2689 dev_err(di->dev,
2690 "failed to set automatic current limitation\n");
2681 goto out; 2691 goto out;
2682 } 2692 }
2683 2693