diff options
author | Li Jun <b47624@freescale.com> | 2014-04-23 11:56:50 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-24 23:56:35 +0400 |
commit | 4dcf720c5d40b27c916e7115ad75b335c9c1e264 (patch) | |
tree | dd40e11f5e40ee2dbe96b8a9ac2b12538692dd33 /drivers/usb/chipidea/otg.c | |
parent | e287b67b00c8d5306e0fe6be1d597e23d8c4783e (diff) | |
download | linux-4dcf720c5d40b27c916e7115ad75b335c9c1e264.tar.xz |
usb: chipidea: OTG HNP and SRP fsm implementation
USB OTG interrupt handling and fsm transitions according to USB OTG
and EH 2.0.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/otg.c')
-rw-r--r-- | drivers/usb/chipidea/otg.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/usb/chipidea/otg.c b/drivers/usb/chipidea/otg.c index d76db51ecda7..38e340cba1f9 100644 --- a/drivers/usb/chipidea/otg.c +++ b/drivers/usb/chipidea/otg.c @@ -11,8 +11,8 @@ */ /* - * This file mainly handles otgsc register, it may include OTG operation - * in the future. + * This file mainly handles otgsc register, OTG fsm operations for HNP and SRP + * are also included. */ #include <linux/usb/otg.h> @@ -91,6 +91,11 @@ static void ci_otg_work(struct work_struct *work) { struct ci_hdrc *ci = container_of(work, struct ci_hdrc, work); + if (ci_otg_is_fsm_mode(ci) && !ci_otg_fsm_work(ci)) { + enable_irq(ci->irq); + return; + } + if (ci->id_event) { ci->id_event = false; ci_handle_id_switch(ci); |