aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorBin Liu <b-liu@ti.com>2015-11-03 12:51:15 -0500
committerFelipe Balbi <balbi@ti.com>2015-12-15 10:12:41 -0500
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 @@
12#include <linux/usb/phy.h> 12#include <linux/usb/phy.h>
13 13
14#if IS_ENABLED(CONFIG_OF) 14#if IS_ENABLED(CONFIG_OF)
15enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *phy_np);
15bool of_usb_host_tpl_support(struct device_node *np); 16bool of_usb_host_tpl_support(struct device_node *np);
16int of_usb_update_otg_caps(struct device_node *np, 17int of_usb_update_otg_caps(struct device_node *np,
17 struct usb_otg_caps *otg_caps); 18 struct usb_otg_caps *otg_caps);
18#else 19#else
20enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *phy_np)
21{
22 return USB_DR_MODE_UNKNOWN;
23}
19static inline bool of_usb_host_tpl_support(struct device_node *np) 24static inline bool of_usb_host_tpl_support(struct device_node *np)
20{ 25{
21 return false; 26 return false;