]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
usb: gadget: tegra: default charger port as CDP
authorRakesh Bodla <rbodla@nvidia.com>
Thu, 27 Dec 2012 17:51:21 +0000 (23:21 +0530)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 19:48:55 +0000 (12:48 -0700)
Based on LS status we are detecting CDP or DCP
port. In other case, it is also safe to assume
as DCP and no need to suspect any presence
of bug.

Bug 1207043

Reviewed-on: http://git-master/r/188539
(cherry picked from commit 1da8e50007de74bdf7af7f1a14028b11ccfe7c7e)

Change-Id: I3f2e308d4821e9629b43eb558e7838b832661bf4
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/189046
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
drivers/usb/gadget/tegra_udc.c

index a0a818dd537df8af62dc9ef905f79f0d941eb236..6c6b3ce24256be284d13410461d63ecd7f72d246 100644 (file)
@@ -1349,8 +1349,10 @@ static void tegra_detect_charging_type_is_cdp_or_dcp(struct tegra_udc *udc)
                 * Status, host might initiate the RESET, then we see both
                 * line status as 0 (SE0). This really should not happen as we
                 * disabled the kernel preemption before reaching here.
+                * Bug can be raised here but it is also safe to assume
+                * as CDP.
                 */
-               BUG();
+               udc->connect_type = CONNECT_TYPE_CDP;
 
        spin_unlock_irqrestore(&udc->lock, flags);
 }