diff options
| author | Li Jun <B47624@freescale.com> | 2014-03-13 03:22:50 -0400 |
|---|---|---|
| committer | Felipe Balbi <balbi@ti.com> | 2014-04-24 10:53:57 -0400 |
| commit | 2284bb35503ce7b05fce8f0dc8e1cb2a3134ae4e (patch) | |
| tree | 0e228746fbdadcecb5662fc22d46f2a17ae75527 | |
| parent | a31a942a148e0083ce560ffeb54fb60e06ab7201 (diff) | |
usb: phy: fsm: update OTG HNP state transition
According to:"On-The-Go and Embedded Host Supplement to the USB Revision 2.0
Specification July 27, 2012 Revision 2.0 version 1.1a"
- add a_wait_vrise to a_wait_vfall
- update condition from a_wait_vrise to a_wait_bcon
Signed-off-by: Li Jun <b47624@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
| -rw-r--r-- | drivers/usb/phy/phy-fsm-usb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/phy/phy-fsm-usb.c b/drivers/usb/phy/phy-fsm-usb.c index c47e5a6edde2..731b4a5d6639 100644 --- a/drivers/usb/phy/phy-fsm-usb.c +++ b/drivers/usb/phy/phy-fsm-usb.c | |||
| @@ -303,10 +303,11 @@ int otg_statemachine(struct otg_fsm *fsm) | |||
| 303 | otg_set_state(fsm, OTG_STATE_A_WAIT_VRISE); | 303 | otg_set_state(fsm, OTG_STATE_A_WAIT_VRISE); |
| 304 | break; | 304 | break; |
| 305 | case OTG_STATE_A_WAIT_VRISE: | 305 | case OTG_STATE_A_WAIT_VRISE: |
| 306 | if (fsm->id || fsm->a_bus_drop || fsm->a_vbus_vld || | 306 | if (fsm->a_vbus_vld) |
| 307 | fsm->a_wait_vrise_tmout) { | ||
| 308 | otg_set_state(fsm, OTG_STATE_A_WAIT_BCON); | 307 | otg_set_state(fsm, OTG_STATE_A_WAIT_BCON); |
| 309 | } | 308 | else if (fsm->id || fsm->a_bus_drop || |
| 309 | fsm->a_wait_vrise_tmout) | ||
| 310 | otg_set_state(fsm, OTG_STATE_A_WAIT_VFALL); | ||
| 310 | break; | 311 | break; |
| 311 | case OTG_STATE_A_WAIT_BCON: | 312 | case OTG_STATE_A_WAIT_BCON: |
| 312 | if (!fsm->a_vbus_vld) | 313 | if (!fsm->a_vbus_vld) |
