diff options
| author | Li Jun <b47624@freescale.com> | 2014-05-16 15:15:34 -0400 |
|---|---|---|
| committer | Li Jun <B47624@freescale.com> | 2014-06-26 04:50:06 -0400 |
| commit | 1cdff41f78377a5c318013f7baa9c56880a56595 (patch) | |
| tree | 40748e1b30c8d0cd2fb6538b835592e9cdbfee10 /include/linux | |
| parent | e4f6fd0ec67b34ca9ed40dfd009e75c66fb71d94 (diff) | |
ENGR00319720-3 usb: common: otg-fsm: add HNP polling request sending funciton
This patch adds OTG status selector request sending function, can be used
to poll peripheral if it wants to be host.
Signed-off-by: Li Jun <b47624@freescale.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/usb/otg-fsm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/usb/otg-fsm.h b/include/linux/usb/otg-fsm.h index 1deea98838b2..d4bf33b1ad6f 100644 --- a/include/linux/usb/otg-fsm.h +++ b/include/linux/usb/otg-fsm.h | |||
| @@ -40,6 +40,14 @@ | |||
| 40 | #define PROTO_HOST (1) | 40 | #define PROTO_HOST (1) |
| 41 | #define PROTO_GADGET (2) | 41 | #define PROTO_GADGET (2) |
| 42 | 42 | ||
| 43 | #define OTG_STS_SELECTOR 0xF000 /* OTG status selector, according to | ||
| 44 | * OTG and EH 2.0 Charpter 6.2.3 | ||
| 45 | * Table:6-4 | ||
| 46 | */ | ||
| 47 | #define HOST_REQUEST_FLAG 1 /* Host request flag, according to | ||
| 48 | * OTG and EH 2.0 Charpter 6.2.3 | ||
| 49 | * Table:6-5 | ||
| 50 | */ | ||
| 43 | enum otg_fsm_timer { | 51 | enum otg_fsm_timer { |
| 44 | /* Standard OTG timers */ | 52 | /* Standard OTG timers */ |
| 45 | A_WAIT_VRISE, | 53 | A_WAIT_VRISE, |
| @@ -240,6 +248,7 @@ static inline int otg_start_gadget(struct otg_fsm *fsm, int on) | |||
| 240 | return fsm->ops->start_gadget(fsm, on); | 248 | return fsm->ops->start_gadget(fsm, on); |
| 241 | } | 249 | } |
| 242 | 250 | ||
| 251 | int otg_hnp_polling(struct otg_fsm *fsm); | ||
| 243 | int otg_statemachine(struct otg_fsm *fsm); | 252 | int otg_statemachine(struct otg_fsm *fsm); |
| 244 | 253 | ||
| 245 | #endif /* __LINUX_USB_OTG_FSM_H */ | 254 | #endif /* __LINUX_USB_OTG_FSM_H */ |
