summaryrefslogtreecommitdiff
path: root/drivers/phy/allwinner/phy-sun4i-usb.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-04-02 16:20:47 +0700
committerMark Brown <broonie@kernel.org>2019-04-02 16:20:47 +0700
commit6d5e2bf9d203e4d9e08ca2e9420c6ff22ad190af (patch)
treec2c20648773d3326f942e34ef73b06566f7a19ec /drivers/phy/allwinner/phy-sun4i-usb.c
parentb820d52e7eed7b30b2dfef5f4213a2bc3cbea6f3 (diff)
parent257f9053c0204ea47491aa236004fd1226f75fa8 (diff)
Merge branch 'acpi-utils' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm into asoc-5.2
Diffstat (limited to 'drivers/phy/allwinner/phy-sun4i-usb.c')
-rw-r--r--drivers/phy/allwinner/phy-sun4i-usb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index 5163097b43df..4bbd9ede38c8 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -485,8 +485,11 @@ static int sun4i_usb_phy_set_mode(struct phy *_phy,
struct sun4i_usb_phy_data *data = to_sun4i_usb_phy_data(phy);
int new_mode;
- if (phy->index != 0)
+ if (phy->index != 0) {
+ if (mode == PHY_MODE_USB_HOST)
+ return 0;
return -EINVAL;
+ }
switch (mode) {
case PHY_MODE_USB_HOST: