OSDN Git Service

usb: dwc3: add support for pwr_event_irq
authorBar Weiner <bweiner@codeaurora.org>
Mon, 19 May 2014 08:18:01 +0000 (11:18 +0300)
committerDavid Keitel <dkeitel@codeaurora.org>
Tue, 22 Mar 2016 18:06:29 +0000 (11:06 -0700)
commit87ac720b8ac268d8361529c2add92765bbc1f251
tree0aa09206651975fcd07357deaa551692ca53c44a
parent94e3cbb5f253c363b298f1410b0d926043296c38
usb: dwc3: add support for pwr_event_irq

Adds support for the pwr_event_irq in general, and for
the L1_OUT pwr event specifically. The support consists of:
1. Enabling the pwr_event_irq based on the DT.
2. Adding a threaded irq handler as well as a centralized function
   (dwc3_pwr_event_handler()) for handling the various power events.
3. Enabling the L1_OUT pwr event. This is done on an
   arch-by-arch basis. The trigger for enabling this is
   dbm_l1_lpm_interrupt().
4. Calling usb_gadget_wakeup() in order to initiate a wakeup sequence
   without sending a remote-wakeup indication to the host.
5. Adding a call from dwc3_msm_resume() to dwc3_pwr_event_handler().
   This is done in order to overcome a situation where
   dwc3_msm_suspend() would have disabled the clocks, thereby
   disabling the ability to read the PWR_STAT register before calling
   the handler function.

Change-Id: Ia548ec2e9ee4a7c6634c87ba24fe4cdbf1221000
Signed-off-by: Dov Levenglick <dovl@codeaurora.org>
Signed-off-by: Bar Weiner <bweiner@codeaurora.org>
drivers/usb/dwc3/gadget.c