]> git.baikalelectronics.ru Git - kernel.git/commit
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>
Tue, 26 Mar 2019 07:48:55 +0000 (16:48 +0900)
commitbd4132840e577c6c180daeb462918b73548f17b8
tree3ebf2020baa0dd22da64a0edca95f132c2e83b41
parentb6fab0766b75191f2174fd1bb3eb7bbdb9e6a197
phy: sun4i-usb: Support set_mode to USB_HOST for non-OTG PHYs

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 59a172df4d56 ("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: e7252b9d0a01 ("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