aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/otg
diff options
context:
space:
mode:
authorSakethram Bommisetti <sakethram.bommisetti@stericsson.com>2011-06-28 14:04:56 +0530
committerPhilippe LANGLAIS <philippe.langlais@stericsson.com>2011-06-28 13:08:56 +0200
commit9ea8b0ee0096724fac2597c7c36656490fe2a98a (patch)
treee1723bad883e02e3e87f7f4dfa5ef60e88b1d548 /drivers/usb/otg
parent2a4441516d2e72e8353b151cdafb6523245d20a4 (diff)
USB:Software fix for usb eye diagram issue when drawing more than 100mA
AB V2 has eye diagram issues when drawing more than 100mA from VBUS.So setting charging current to 100mA in case of standard host Change-Id: Iaa5eb5751a4b0665fbe6f6148b712ffa9f96a06b Signed-off-by: Sakethram Bommisetti <sakethram.bommisetti@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25958 Reviewed-by: Praveena NADAHALLY <praveen.nadahally@stericsson.com> Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Diffstat (limited to 'drivers/usb/otg')
-rw-r--r--drivers/usb/otg/ab8500-usb.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/usb/otg/ab8500-usb.c b/drivers/usb/otg/ab8500-usb.c
index 25de231a012..fd5943b7d38 100644
--- a/drivers/usb/otg/ab8500-usb.c
+++ b/drivers/usb/otg/ab8500-usb.c
@@ -356,6 +356,21 @@ static void ab8500_usb_phy_disable_work(struct work_struct *work)
ab8500_usb_peri_phy_dis(ab);
}
+static unsigned ab8500_eyediagram_workaroud(struct ab8500_usb *ab, unsigned mA)
+{
+ if (mA > 100) {
+ /* AB V2 has eye diagram issues when drawing more
+ * than 100mA from VBUS.So setting charging current
+ * to 100mA in case of standard host
+ */
+ if (ab->rev < 0x30)
+ mA = 100;
+ else
+ mA = 300;
+ }
+ return mA;
+}
+
static int ab8500_usb_set_power(struct otg_transceiver *otg, unsigned mA)
{
struct ab8500_usb *ab;
@@ -365,6 +380,8 @@ static int ab8500_usb_set_power(struct otg_transceiver *otg, unsigned mA)
ab = xceiv_to_ab(otg);
+ mA = ab8500_eyediagram_workaroud(ab, mA);
+
ab->vbus_draw = mA;
atomic_notifier_call_chain(&ab->otg.notifier,