aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorNeil Zhang <zhangwm@marvell.com>2011-10-12 04:49:35 -0400
committerFelipe Balbi <balbi@ti.com>2011-10-13 13:42:06 -0400
commit046b07ac0458fba8c5ca8d9ee04658c02066ee03 (patch)
treeee85a5f7c30e3dc711732cffe2ee8fbc3f9c2000 /drivers/usb
parent366162245e619d59c9d615774ab3aa639deb7725 (diff)
usb: gadget: mv_udc: add shutdown function for it
put the device in idle when shutdown. Signed-off-by: Neil Zhang <zhangwm@marvell.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/mv_udc_core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/usb/gadget/mv_udc_core.c b/drivers/usb/gadget/mv_udc_core.c
index f8dc5b3dd796..ffa6f3097a64 100644
--- a/drivers/usb/gadget/mv_udc_core.c
+++ b/drivers/usb/gadget/mv_udc_core.c
@@ -2206,9 +2206,21 @@ static const struct dev_pm_ops mv_udc_pm_ops = {
2206}; 2206};
2207#endif 2207#endif
2208 2208
2209static void mv_udc_shutdown(struct platform_device *dev)
2210{
2211 struct mv_udc *udc = the_controller;
2212 u32 mode;
2213
2214 /* reset controller mode to IDLE */
2215 mode = readl(&udc->op_regs->usbmode);
2216 mode &= ~3;
2217 writel(mode, &udc->op_regs->usbmode);
2218}
2219
2209static struct platform_driver udc_driver = { 2220static struct platform_driver udc_driver = {
2210 .probe = mv_udc_probe, 2221 .probe = mv_udc_probe,
2211 .remove = __exit_p(mv_udc_remove), 2222 .remove = __exit_p(mv_udc_remove),
2223 .shutdown = mv_udc_shutdown,
2212 .driver = { 2224 .driver = {
2213 .owner = THIS_MODULE, 2225 .owner = THIS_MODULE,
2214 .name = "pxa-u2o", 2226 .name = "pxa-u2o",