summaryrefslogtreecommitdiff
path: root/drivers/usb/common
AgeCommit message (Collapse)Author
2015-06-23MLK-9897-2 usb: otg-fsm: check B-device state before sending polling requestLi Jun
While system resume, the connected udev as B-device may not has been resumed, if HNP polling request is sent to it, HNP polling may fail, this patch adds check of the udev state to make sure it finished resume and to be configured state before sending host request message, otherwise try next HNP polling request. Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Li Jun <jun.li@freescale.com> (cherry picked from commit 2cff5eb7bd4feb70cd28ac4655e7433e57a17938)
2015-04-14MLK-10279-1 usb: common: otg-fsm: only signal connect after switching to ↵Peter Chen
peripheral We should signal connect (pull up dp) after we have already at peripheral mode, otherwise, the dp may be toggled due to we reset controller or do disconnect during the initialization for peripheral, then, the host may be confused during the enumeration, eg, it finds the reset can't succeed, but the device is still there, see below error message. hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: Cannot enable port 1. Maybe the USB cable is bad? hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: Cannot enable port 1. Maybe the USB cable is bad? hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: Cannot enable port 1. Maybe the USB cable is bad? hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: cannot reset port 1 (err = -32) hub 1-0:1.0: Cannot enable port 1. Maybe the USB cable is bad? hub 1-0:1.0: unable to enumerate USB device on port 1 Signed-off-by: Peter Chen <peter.chen@freescale.com>
2015-04-14MLK-10051-2 usb: common: otg: set feature of b_hnp_enable after host request ↵Li Jun
flag is set The A-device is required to set this feature and suspend the bus within THOST_REQ_SUSP when it determines that the B-device wishes to become host (host_req_flag = TRUE). So this patch does this if host request flag is set and a_set_b_hnp_en has not been set. Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Li Jun <jun.li@freescale.com>
2015-04-14MLK-9794-2 usb: common: otg: clear host_request_flag when leaves peripheralLi Jun
This patch clear host_request_flag when leaves peripheral state, instead of entering host state, this can make sure this flag can be cleared after try to do role switch, no matter the role switch succeeds or not. Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Li Jun <b47624@freescale.com>
2015-04-14ENGR00319720-3 usb: common: otg-fsm: add HNP polling request sending funcitonLi Jun
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>
2015-04-14ENGR00319720-2 usb: common: otg-fsm: start HNP polling timer in host stateLi Jun
This patch starts HNP polling timer when otg is set to be a_host or b_host. Signed-off-by: Li Jun <b47624@freescale.com>
2015-04-14usb: move the OTG state from the USB PHY to the OTG structureAntoine Tenart
Before using the PHY framework instead of the USB PHY one, we need to move the OTG state into another place, since it won't be available when USB PHY isn't used. This patch moves the OTG state into the OTG structure, and makes all the needed modifications in the drivers using the OTG state. [ balbi@ti.com : fix build regressions with phy-tahvo.c, musb_dsps.c, phy-isp1301-omap, and chipidea's debug.c ] Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Acked-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com> Signed-off-by: Felipe Balbi <balbi@ti.com> (cherry picked from commit e47d92545c2972bcf3711e7db80f481e402163c7) Conflicts: drivers/usb/musb/musb_gadget.c drivers/usb/phy/phy-msm-usb.c
2015-04-14usb: common: add API to get if the platform supports TPLPeter Chen
The TPL (Targeted Peripheral List) is used for targeted hosts (non-PC hosts), and it can be used at USB OTG & EH certification and some specific products which need white list. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-14usb: common: rename phy-fsm-usb.c to usb-otg-fsm.cPeter Chen
Since usb otg fsm implementation is not related to usb phy. We move it from usb/phy/ to usb/common/, and rename it to reflect its real meaning. Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-14usb: move usb/usb-common.c to usb/common/usb-common.cPeter Chen
Since we will have more usb-common things, and it will let usb-common.c be larger and larger, we create a folder named usb/common for all usb common things. Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>