diff options
author | Peter Chen <peter.chen@freescale.com> | 2010-11-30 12:47:57 +0800 |
---|---|---|
committer | Alan Tull <alan.tull@freescale.com> | 2011-02-03 16:32:41 -0600 |
commit | 6e0635c7d23933481fb236a33d75fa39b14a809a (patch) | |
tree | 8de58ec63ce2ec96463bda0b66568c257a7acea7 /include | |
parent | 05351bb3bbc517ebfd86ea917eb84d24661c28ee (diff) |
ENGR00134154-3 usb: add sync between usb resume and usb wakeup thread
The usb wakeup thread should be prior to usb system resume
during usb wakeup process. It adds wait_event_interruptible
at usb resume process, and the usb wakeup irq will set event,
and the usb wakeup thread will clear event.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fsl_devices.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index 5d7828041332..4f68788c55e0 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h @@ -67,6 +67,7 @@ enum fsl_usb2_phy_modes { FSL_USB2_PHY_SERIAL, }; +struct fsl_usb2_wakeup_platform_data; struct platform_device; struct fsl_usb2_platform_data { /* board specific information */ @@ -105,6 +106,7 @@ struct fsl_usb2_platform_data { unsigned lowpower:1; unsigned irq_delay:1; unsigned wakeup_event:1; + struct fsl_usb2_wakeup_platform_data *wakeup_pdata; u32 id_gpio; /* register save area for suspend/resume */ @@ -127,6 +129,15 @@ struct fsl_usb2_wakeup_platform_data { char *name; void (*usb_clock_for_pm) (bool); struct fsl_usb2_platform_data *usb_pdata[3]; + /* This waitqueue is used to wait "usb_wakeup thread" to finish + * during system resume routine. "usb_wakeup theard" should be finished + * prior to usb resume routine. + */ + wait_queue_head_t wq; + /* This flag is used to indicate the "usb_wakeup thread" is finished during + * usb wakeup routine. + */ + bool usb_wakeup_is_pending; }; |