projects
/
platform
/
kernel
/
linux-rpi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
phy: sun4i-usb: Support set_mode to USB_HOST for non-OTG PHYs
[platform/kernel/linux-rpi.git]
/
drivers
/
phy
/
allwinner
/
phy-sun4i-usb.c
diff --git
a/drivers/phy/allwinner/phy-sun4i-usb.c
b/drivers/phy/allwinner/phy-sun4i-usb.c
index
5163097
..
4bbd9ed
100644
(file)
--- 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: