While going to LP0 with charger/PC connected, otg state
changes from peripheral to suspend. If the previous connect type
is charger then udc driver need not notify otg as this would
acquire a temporary wakelock and abort the suspend.
Notify only when HOST PC is connected.
Bug
1354941
Change-Id: Id90af5c4a224424d06322ccc6b3e8e0e13a084d6
Signed-off-by: Rohith Seelaboyina <rseelaboyina@nvidia.com>
Reviewed-on: http://git-master/r/299405
Reviewed-by: Rakesh Babu Bodla <rbodla@nvidia.com>
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
case CONNECT_TYPE_NONE:
dev_info(dev, "USB cable/charger disconnected\n");
max_ua = 0;
- tegra_udc_notify_event(udc, USB_EVENT_NONE);
+ /* Notify if HOST(SDP/CDP) is connected */
+ if ((udc->prev_connect_type == CONNECT_TYPE_SDP) ||
+ (udc->prev_connect_type == CONNECT_TYPE_CDP))
+ tegra_udc_notify_event(udc, USB_EVENT_NONE);
break;
case CONNECT_TYPE_SDP:
if (udc->current_limit > 2)