aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy/phy-twl4030-usb.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2016-09-23 16:40:56 +0300
committerKishon Vijay Abraham I <kishon@ti.com>2016-11-18 18:19:16 +0530
commit5d04c883797209f566538e27441b2563afe4e9b9 (patch)
tree6f651f0b5c9131d6b9aba1dc673e10e34a14ad17 /drivers/phy/phy-twl4030-usb.c
parentphy: fix returnvar.cocci warnings (diff)
downloadlinux-dev-5d04c883797209f566538e27441b2563afe4e9b9.tar.xz
linux-dev-5d04c883797209f566538e27441b2563afe4e9b9.zip
phy_sun4i_usb: set_mode: Allow using set_mode to force end the current session
The sunxi musb has a bug where sometimes it will generate a babble error on device disconnect instead of a disconnect irq. When this happens the musb-controller switches from host mode to device mode (it clears MUSB_DEVCTL_SESSION and sets MUSB_DEVCTL_BDEVICE) and gets stuck in this state. Clearing this requires reporting Vbus low for 200 or more ms, but on some devices Vbus is simply always high (host-only mode, no Vbus control). This commit modifies sun4i_usb_phy_set_mode so that it will force end the current session when called with the current mode, before this commit calling set_mode with the current mode was a nop since id_det would stay the same resulting in the detect_work not doing anything. This allows the sunxi-musb glue to use sun4i_usb_phy_set_mode to force end the current session without changing the mode, to fixup the stuck state after a babble error. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy/phy-twl4030-usb.c')
0 files changed, 0 insertions, 0 deletions