summaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy/phy-fsm-usb.c
Commit message (Collapse)AuthorAgeFilesLines
* usb: phy: fsm: change "|" to "||" for condition OTG_STATE_A_WAIT_BCON at ↵Peter Chen2014-04-241-1/+1
| | | | | | | | | statemachine We should be using logical "or" not bitwise "or". Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: fsm: update OTG HNP state transitionLi Jun2014-04-241-3/+4
| | | | | | | | | | | 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>
* usb: phy: fsm: update OTG HNP state transition conditions according to OTG ↵Li Jun2014-03-071-4/+5
| | | | | | | | | | | | | and EH 2.0 spec. 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" - From a_host to a_wait_bcon if !b_conn - Add transition from a_host to a_wait_vfall if id state is high or a_bus_drop - From a_wait_vfall to a_idle if a_wait_vfall_tmout Signed-off-by: Li Jun <b47624@freescale.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy-fsm: Staticize local symbolsSachin Kamat2013-12-231-2/+2
| | | | | | | Local symbols appearing only in this file are made static. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: Fix double lock in OTG FSMAnton Tikhomirov2013-12-201-1/+1
| | | | | | | | Mutex obtained at the beginning of the function should be released at the end to avoid double locking. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: move OTG FSM headerAnton Tikhomirov2013-11-261-2/+1
| | | | | | | | Other USB drivers may want to use OTG final state machine implementation, so make this header available for them. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: replace spinlock with mutex in OTG FSMAnton Tikhomirov2013-11-261-4/+3
| | | | | | | | | | | | OTG Final State Machine calls functions which may sleep. For example, start_gadget callback implementation can use usb_gadget_vbus_connect(), whose context: can sleep. If so, mutex should be used instead of spinlock. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: Add and use missed OTG FSM inputs/outputsAnton Tikhomirov2013-10-041-3/+15
| | | | | | | | | Several input/output variables missed in current FSM implementation. This patch adds and makes use of them as specified in OTG and EH supplement to USB2.0. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: Rename "B-device session end SRP" OTG FSM inputAnton Tikhomirov2013-10-041-1/+1
| | | | | | | | In accordance with OTG and EH supplement, the correct name of the FSM input is b_ssend_srp. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: Rename OTG FSM informative variablesAnton Tikhomirov2013-10-041-3/+3
| | | | | | | | | Mark informative variables with suffix '_inf' to distinguish them from other non-informative variables with the same name. If such non-informative varialbes were missed, they are created. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: Add and use missed OTG FSM timersAnton Tikhomirov2013-10-041-3/+9
| | | | | | | | | a_bidl_adis_tmr and a_wait_vfall_tmr OTG timers missed in current FSM implementation. This patch adds and makes use of the timers as speicfied in OTG and EH supplement to USB2.0. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: Fix OTG FSM timer handlingAnton Tikhomirov2013-10-041-14/+14
| | | | | | | | Get rid of using OTG driver specific timers by passing timer type to corresponding callbacks. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: Add and use missed helper functionsAnton Tikhomirov2013-10-041-4/+4
| | | | | | | | This patch implements missed helper functions for start_gadget() and start_host() OTG FSM callbacks. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: phy: fix build breakageAnatolij Gustschin2013-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 94ae9843 (usb: phy: rename all phy drivers to phy-$name-usb.c) renamed drivers/usb/phy/otg_fsm.h to drivers/usb/phy/phy-fsm-usb.h but changed drivers/usb/phy/phy-fsm-usb.c to include not existing "phy-otg-fsm.h" instead of new "phy-fsm-usb.h". This breaks building: ... drivers/usb/phy/phy-fsm-usb.c:32:25: fatal error: phy-otg-fsm.h: No such file or directory compilation terminated. make[3]: *** [drivers/usb/phy/phy-fsm-usb.o] Error 1 This commit also missed to modify drivers/usb/phy/phy-fsl-usb.h to include new "phy-fsm-usb.h" instead of "otg_fsm.h" resulting in another build breakage: ... In file included from drivers/usb/phy/phy-fsl-usb.c:46:0: drivers/usb/phy/phy-fsl-usb.h:18:21: fatal error: otg_fsm.h: No such file or directory compilation terminated. make[3]: *** [drivers/usb/phy/phy-fsl-usb.o] Error 1 Fix both issues. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: stable <stable@vger.kernel.org> # 3.10+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: phy: rename all phy drivers to phy-$name-usb.cFelipe Balbi2013-03-181-0/+348
this will make sure that we have sensible names for all phy drivers. Current situation was already quite bad with too generic names being used. Signed-off-by: Felipe Balbi <balbi@ti.com>