mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
usb: gadget: mv_udc: add shutdown function for it
put the device in idle when shutdown. Signed-off-by: Neil Zhang <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
This commit is contained in:
parent
366162245e
commit
046b07ac04
1 changed files with 12 additions and 0 deletions
|
|
@ -2206,9 +2206,21 @@ static const struct dev_pm_ops mv_udc_pm_ops = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static void mv_udc_shutdown(struct platform_device *dev)
|
||||
{
|
||||
struct mv_udc *udc = the_controller;
|
||||
u32 mode;
|
||||
|
||||
/* reset controller mode to IDLE */
|
||||
mode = readl(&udc->op_regs->usbmode);
|
||||
mode &= ~3;
|
||||
writel(mode, &udc->op_regs->usbmode);
|
||||
}
|
||||
|
||||
static struct platform_driver udc_driver = {
|
||||
.probe = mv_udc_probe,
|
||||
.remove = __exit_p(mv_udc_remove),
|
||||
.shutdown = mv_udc_shutdown,
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "pxa-u2o",
|
||||
|
|
|
|||
Loading…
Reference in a new issue