aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorOleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com>2012-04-26 12:46:51 +0300
committerDmytro Kedrovskyi <x0169235@ti.com>2012-05-08 17:07:46 +0300
commit069b8f4bad0acaec5b9b77c5a412143f4d8b0e09 (patch)
treefcc07f6d005bf2026039d44b575ac0d10da6a979 /drivers/power
parentb65dba46890825d133b5f87287b2e8248d26eb56 (diff)
downloadkernel_samsung_espresso10-069b8f4bad0acaec5b9b77c5a412143f4d8b0e09.zip
kernel_samsung_espresso10-069b8f4bad0acaec5b9b77c5a412143f4d8b0e09.tar.gz
kernel_samsung_espresso10-069b8f4bad0acaec5b9b77c5a412143f4d8b0e09.tar.bz2
MFD: TWL6032: Implementation of the ProDB00119490 errata
Residual voltage may be present on VBUS when USB cable is unplugged. Workaround: Increase the VBUS anticollapse loop threshold to 4.44 V. This errata affects only TWL6032 ES1.1 Change-Id: I7533fa7e3caa98e9e326f0c30cfb31d813303be8 Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/twl6030_bci_battery.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/power/twl6030_bci_battery.c b/drivers/power/twl6030_bci_battery.c
index 70482ad..b54248d 100644
--- a/drivers/power/twl6030_bci_battery.c
+++ b/drivers/power/twl6030_bci_battery.c
@@ -2325,6 +2325,25 @@ static int __devinit twl6030_bci_battery_probe(struct platform_device *pdev)
wake_lock_init(&chrg_lock, WAKE_LOCK_SUSPEND, "ac_chrg_wake_lock");
+ if (di->errata & TWL6032_ERRATA_DB00119490) {
+ /*
+ * Set Anti-collapse threshold correspond
+ * to the ERRATA DB00119490 (4.4 volts)
+ */
+ ret = twl_i2c_read_u8(TWL6030_MODULE_CHARGER, &reg,
+ ANTICOLLAPSE_CTRL1);
+ if (ret)
+ goto temp_setup_fail;
+
+ reg = reg & 0x1F;
+ reg = reg | ((0x3) << BUCK_VTH_SHIFT);
+ ret = twl_i2c_write_u8(TWL6030_MODULE_CHARGER, reg,
+ ANTICOLLAPSE_CTRL1);
+
+ if (ret)
+ goto temp_setup_fail;
+ }
+
/* settings for temperature sensing */
ret = twl6030battery_temp_setup(true);
if (ret)