aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPankaj <pankaj.dubey@samsung.com>2011-12-15 15:13:34 +0800
committerAndy Green <andy.green@linaro.org>2011-12-26 22:33:52 +0800
commit6b8e5e51cdfa64ba2c8e9d62b896ba7e3c19d11e (patch)
tree84e3262e76c0871683098af347b1b3d363feb67c
parent7c18aa739a0736da3f8079788b430491578ea9a4 (diff)
usb: gadget: s3c_udc_otg: Handle USB connection event in ISR
In UDC ISR usb handled USB connection event so that android platform can update notification accordingly. Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com>
-rw-r--r--drivers/usb/gadget/s3c_udc_otg_xfer_dma.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c b/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
index 0116655cb57..7e83f476c86 100644
--- a/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
+++ b/drivers/usb/gadget/s3c_udc_otg_xfer_dma.c
@@ -506,6 +506,13 @@ static irqreturn_t s3c_udc_irq(int irq, void *_dev)
reset_available = 1;
DEBUG_ISR("\t\tRESET handling skipped\n");
}
+ /* Added to handle usb connect/disconnect even in boards not having
+ usb detection chip.
+ */
+ if((usb_status & 0xd0000) == (0x1 << 16)) {
+ stop_activity(dev, dev->driver);
+ DEBUG_ISR("s3c_udc: Cable removed\n");
+ }
}
if (intr_status & INT_IN_EP)