usb: gadget: tegra: default charger port as CDP
Rakesh Bodla [Thu, 27 Dec 2012 17:51:21 +0000 (22:51 +0530)]
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

Change-Id: I6c3a7a5a207571694ba62d0298a5388d0b80ef16
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/188539
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

drivers/usb/gadget/tegra_udc.c

index b3c5902..8313500 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);
 }