phy: sun4i-usb: Support set_mode to USB_HOST for non-OTG PHYs
authorChen-Yu Tsai <wens@csie.org>
Fri, 22 Mar 2019 08:51:07 +0000 (16:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2019 04:25:19 +0000 (06:25 +0200)
commitd05885ad4d32582da1716f1122cfa28f976abb7d
treed4e0707dab30168089b21a6620d06d7fe052f88b
parent5d4cc25d578cf253a76b14c1ea3ebbc825b2f38a
phy: sun4i-usb: Support set_mode to USB_HOST for non-OTG PHYs

commit 1396929e8a903db80425343cacca766a18ad6409 upstream.

While only the first PHY supports mode switching, the remaining PHYs
work in USB host mode. They should support set_mode with mode=USB_HOST
instead of failing. This is especially needed now that the USB core does
set_mode for all USB ports, which was added in commit b97a31348379 ("usb:
core: comply to PHY framework").

Make set_mode with mode=USB_HOST a no-op instead of failing for the
non-OTG USB PHYs.

Fixes: 6ba43c291961 ("phy-sun4i-usb: Add support for phy_set_mode")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/phy/allwinner/phy-sun4i-usb.c