summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorJonas Aaberg <jonas.aberg@stericsson.com>2012-05-11 12:42:25 +0200
committerLee Jones <lee.jones@linaro.org>2013-01-23 14:39:20 +0000
commit0ed5107fa86013c91b1752230d44b79dffee0cda (patch)
tree5e7102658eb34811560f43cabebf6d9eb5b8cb02 /drivers/power
parent1a793a10899487d40ac3071f52a6e231260d935d (diff)
downloadop-kernel-dev-0ed5107fa86013c91b1752230d44b79dffee0cda.zip
op-kernel-dev-0ed5107fa86013c91b1752230d44b79dffee0cda.tar.gz
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')
-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 a632b94..871bf5a 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)
}
}
- /* VBUS OVV set to 6.3V and enable automatic current limitiation */
- ret = abx500_set_register_interruptible(di->dev,
- AB8500_CHARGER,
- AB8500_USBCH_CTRL2_REG,
- VBUS_OVV_SELECT_6P3V | VBUS_AUTO_IN_CURR_LIM_ENA);
+ if (is_ab9540_2p0(di->parent) || is_ab8505_2p0(di->parent))
+ ret = abx500_mask_and_set_register_interruptible(di->dev,
+ AB8500_CHARGER,
+ AB8500_USBCH_CTRL2_REG,
+ VBUS_AUTO_IN_CURR_LIM_ENA,
+ VBUS_AUTO_IN_CURR_LIM_ENA);
+ else
+ /*
+ * VBUS OVV set to 6.3V and enable automatic current limitation
+ */
+ ret = abx500_set_register_interruptible(di->dev,
+ AB8500_CHARGER,
+ AB8500_USBCH_CTRL2_REG,
+ VBUS_OVV_SELECT_6P3V | VBUS_AUTO_IN_CURR_LIM_ENA);
if (ret) {
- dev_err(di->dev, "failed to set VBUS OVV\n");
+ dev_err(di->dev,
+ "failed to set automatic current limitation\n");
goto out;
}
OpenPOWER on IntegriCloud