diff options
author | Pavankumar Kondeti <pkondeti@codeaurora.org> | 2011-02-18 07:13:17 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-25 14:33:57 -0500 |
commit | e2b61c1df650595d0216c6d086024b5a98d949c7 (patch) | |
tree | 4f64e77a3a8aa9532f018169df2293b7d586438a /drivers/usb/gadget/ci13xxx_udc.h | |
parent | 0e6ca1998e4c803b0be98f97a1d1e1ea562b8964 (diff) |
USB: gadget: Implement remote wakeup in ci13xxx_udc
This patch adds support for remote wakeup. The following things
are handled:
- Process SET_FEATURE/CLEAR_FEATURE control requests sent by host
for enabling/disabling remote wakeup feature.
- Report remote wakeup enable status in response to GET_STATUS
control request.
- Implement wakeup method defined in usb_gadget_ops for initiating
remote wakeup.
- Notify gadget driver about suspend and resume.
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/ci13xxx_udc.h')
-rw-r--r-- | drivers/usb/gadget/ci13xxx_udc.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/gadget/ci13xxx_udc.h b/drivers/usb/gadget/ci13xxx_udc.h index 3fad3adeacc8..6cfab20db6bd 100644 --- a/drivers/usb/gadget/ci13xxx_udc.h +++ b/drivers/usb/gadget/ci13xxx_udc.h | |||
@@ -128,6 +128,9 @@ struct ci13xxx { | |||
128 | u32 ep0_dir; /* ep0 direction */ | 128 | u32 ep0_dir; /* ep0 direction */ |
129 | #define ep0out ci13xxx_ep[0] | 129 | #define ep0out ci13xxx_ep[0] |
130 | #define ep0in ci13xxx_ep[16] | 130 | #define ep0in ci13xxx_ep[16] |
131 | u8 remote_wakeup; /* Is remote wakeup feature | ||
132 | enabled by the host? */ | ||
133 | u8 suspended; /* suspended by the host */ | ||
131 | 134 | ||
132 | struct usb_gadget_driver *driver; /* 3rd party gadget driver */ | 135 | struct usb_gadget_driver *driver; /* 3rd party gadget driver */ |
133 | struct ci13xxx_udc_driver *udc_driver; /* device controller driver */ | 136 | struct ci13xxx_udc_driver *udc_driver; /* device controller driver */ |
@@ -169,6 +172,7 @@ struct ci13xxx { | |||
169 | #define DEVICEADDR_USBADR (0x7FUL << 25) | 172 | #define DEVICEADDR_USBADR (0x7FUL << 25) |
170 | 173 | ||
171 | /* PORTSC */ | 174 | /* PORTSC */ |
175 | #define PORTSC_FPR BIT(6) | ||
172 | #define PORTSC_SUSP BIT(7) | 176 | #define PORTSC_SUSP BIT(7) |
173 | #define PORTSC_HSP BIT(9) | 177 | #define PORTSC_HSP BIT(9) |
174 | #define PORTSC_PTC (0x0FUL << 16) | 178 | #define PORTSC_PTC (0x0FUL << 16) |