summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2010-11-30 12:47:57 +0800
committerPeter Chen <peter.chen@freescale.com>2010-12-02 13:53:25 +0800
commit76b62b0e91e8ef6c64a047b53448a615230f0415 (patch)
tree7970d5dbf13a46838cf18bb2c357db657713e6c8 /include
parent2f6fa988b771cea178ecbc9c73f1d7bd4683d932 (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.h11
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;
};