summaryrefslogtreecommitdiff
path: root/include/linux/usb
diff options
context:
space:
mode:
authorBin Liu <b-liu@ti.com>2015-11-03 11:51:15 -0600
committerFelipe Balbi <balbi@ti.com>2015-12-15 09:12:41 -0600
commit98bfb39466954c69d2a448e6ddcab6d91cd48e25 (patch)
treee5a93ad5f204c67f04663a29c9217500bdd72c42 /include/linux/usb
parentfa4dce2022241f3c938372af0faf9d263061f6a9 (diff)
usb: of: add an api to get dr_mode by the phy node
Some USB phy drivers have different handling for the controller in each dr_mode. But the phy driver does not have visibility to the dr_mode of the controller. This adds an api to return the dr_mode of the controller which associates the given phy node. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/of.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/usb/of.h b/include/linux/usb/of.h
index c3fe9e48ce27..3805757dcdc2 100644
--- a/include/linux/usb/of.h
+++ b/include/linux/usb/of.h
@@ -12,10 +12,15 @@
#include <linux/usb/phy.h>
#if IS_ENABLED(CONFIG_OF)
+enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *phy_np);
bool of_usb_host_tpl_support(struct device_node *np);
int of_usb_update_otg_caps(struct device_node *np,
struct usb_otg_caps *otg_caps);
#else
+enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *phy_np)
+{
+ return USB_DR_MODE_UNKNOWN;
+}
static inline bool of_usb_host_tpl_support(struct device_node *np)
{
return false;