diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2023-04-19 08:59:15 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-04-19 08:59:15 +0200 |
commit | e0f1115ebb757cebbc0cf7dd92a586e3dad19b77 (patch) | |
tree | f694ff849990cbfa962f49954266b5aa6eadf7eb /drivers/phy/phy-core.c | |
parent | d5a06d4800305af6740cde3894d8f4b65b26b392 (diff) | |
parent | 0a73158341d5d3ef1e79e0d77a177121ef502930 (diff) | |
download | barebox-e0f1115ebb757cebbc0cf7dd92a586e3dad19b77.tar.gz |
Merge branch 'for-next/usb'
Diffstat (limited to 'drivers/phy/phy-core.c')
-rw-r--r-- | drivers/phy/phy-core.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c index d3a7847ee8..1a23f35b95 100644 --- a/drivers/phy/phy-core.c +++ b/drivers/phy/phy-core.c @@ -11,7 +11,7 @@ #include <common.h> #include <malloc.h> #include <linux/phy/phy.h> -#include <usb/phy.h> +#include <linux/usb/phy.h> static LIST_HEAD(phy_provider_list); static int phy_ida; @@ -203,6 +203,21 @@ int phy_power_off(struct phy *phy) return 0; } +int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, int submode) +{ + int ret; + + if (!phy || !phy->ops->set_mode) + return 0; + + ret = phy->ops->set_mode(phy, mode, submode); + if (!ret) + phy->attrs.mode = mode; + + return ret; +} +EXPORT_SYMBOL_GPL(phy_set_mode_ext); + struct usb_phy *phy_to_usbphy(struct phy *phy) { if (!phy) |