USB: gadget: Remove spoof disconnect workaround in ci13xxx_msm
The spoof disconnect workaround puts PHY in non-driving mode after pull-up is disabled. Some times pull-up is not getting enabled when PHY is in non-driving mode. As this workaround is not applicable for 28-nm PHY, remove it. CRs-Fixed: 302394 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
committed by
Bryan Huntsman
parent
2d31d27a3a
commit
b7f53dc2da
@@ -29,7 +29,6 @@ static irqreturn_t msm_udc_irq(int irq, void *data)
|
||||
static void ci13xxx_msm_notify_event(struct ci13xxx *udc, unsigned event)
|
||||
{
|
||||
struct device *dev = udc->gadget.dev.parent;
|
||||
int val;
|
||||
|
||||
switch (event) {
|
||||
case CI13XXX_CONTROLLER_RESET_EVENT:
|
||||
@@ -37,17 +36,6 @@ static void ci13xxx_msm_notify_event(struct ci13xxx *udc, unsigned event)
|
||||
writel(0, USB_AHBBURST);
|
||||
writel(0, USB_AHBMODE);
|
||||
break;
|
||||
case CI13XXX_CONTROLLER_STOPPED_EVENT:
|
||||
dev_dbg(dev, "CI13XXX_CONTROLLER_STOPPED_EVENT received\n");
|
||||
/*
|
||||
* Put the transceiver in non-driving mode. Otherwise host
|
||||
* may not detect soft-disconnection.
|
||||
*/
|
||||
val = otg_io_read(udc->transceiver, ULPI_FUNC_CTRL);
|
||||
val &= ~ULPI_FUNC_CTRL_OPMODE_MASK;
|
||||
val |= ULPI_FUNC_CTRL_OPMODE_NONDRIVING;
|
||||
otg_io_write(udc->transceiver, val, ULPI_FUNC_CTRL);
|
||||
break;
|
||||
default:
|
||||
dev_dbg(dev, "unknown ci13xxx_udc event\n");
|
||||
break;
|
||||
|
||||
@@ -2664,9 +2664,6 @@ static int ci13xxx_vbus_session(struct usb_gadget *_gadget, int is_active)
|
||||
hw_device_state(udc->ep0out.qh.dma);
|
||||
} else {
|
||||
hw_device_state(0);
|
||||
if (udc->udc_driver->notify_event)
|
||||
udc->udc_driver->notify_event(udc,
|
||||
CI13XXX_CONTROLLER_STOPPED_EVENT);
|
||||
_gadget_stop_activity(&udc->gadget);
|
||||
pm_runtime_put_sync(&_gadget->dev);
|
||||
}
|
||||
@@ -2698,14 +2695,11 @@ static int ci13xxx_pullup(struct usb_gadget *_gadget, int is_active)
|
||||
}
|
||||
spin_unlock_irqrestore(udc->lock, flags);
|
||||
|
||||
if (is_active) {
|
||||
if (is_active)
|
||||
hw_device_state(udc->ep0out.qh.dma);
|
||||
} else {
|
||||
else
|
||||
hw_device_state(0);
|
||||
if (udc->udc_driver->notify_event)
|
||||
udc->udc_driver->notify_event(udc,
|
||||
CI13XXX_CONTROLLER_STOPPED_EVENT);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2885,9 +2879,6 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
|
||||
if (!(udc->udc_driver->flags & CI13XXX_PULLUP_ON_VBUS) ||
|
||||
udc->vbus_active) {
|
||||
hw_device_state(0);
|
||||
if (udc->udc_driver->notify_event)
|
||||
udc->udc_driver->notify_event(udc,
|
||||
CI13XXX_CONTROLLER_STOPPED_EVENT);
|
||||
_gadget_stop_activity(&udc->gadget);
|
||||
pm_runtime_put(&udc->gadget.dev);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,6 @@ struct ci13xxx_udc_driver {
|
||||
#define CI13XXX_ZERO_ITC BIT(4)
|
||||
|
||||
#define CI13XXX_CONTROLLER_RESET_EVENT 0
|
||||
#define CI13XXX_CONTROLLER_STOPPED_EVENT 1
|
||||
void (*notify_event) (struct ci13xxx *udc, unsigned event);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user