diff options
author | Bin Liu <b-liu@ti.com> | 2015-11-03 20:51:15 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-12-15 18:12:41 +0300 |
commit | 98bfb39466954c69d2a448e6ddcab6d91cd48e25 (patch) | |
tree | e5a93ad5f204c67f04663a29c9217500bdd72c42 /include/linux/usb | |
parent | fa4dce2022241f3c938372af0faf9d263061f6a9 (diff) | |
download | linux-98bfb39466954c69d2a448e6ddcab6d91cd48e25.tar.xz |
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.h | 5 |
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; |