Commit | Line | Data |
---|---|---|
1c9af653 MG |
1 | /* |
2 | * OF helpers for usb devices. | |
3 | * | |
4 | * This file is released under the GPLv2 | |
5 | */ | |
6 | ||
7 | #ifndef __LINUX_USB_OF_H | |
8 | #define __LINUX_USB_OF_H | |
9 | ||
10 | #include <linux/usb/otg.h> | |
11 | #include <linux/usb/phy.h> | |
12 | ||
848d5b91 | 13 | #if IS_ENABLED(CONFIG_OF) |
1c9af653 MG |
14 | enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np); |
15 | #else | |
848d5b91 | 16 | static inline enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np) |
1c9af653 | 17 | { |
848d5b91 | 18 | return USB_DR_MODE_UNKNOWN; |
1c9af653 | 19 | } |
848d5b91 | 20 | #endif |
1c9af653 | 21 | |
848d5b91 PC |
22 | #if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_USB_PHY) |
23 | enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np); | |
24 | #else | |
25 | static inline enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np) | |
1c9af653 | 26 | { |
848d5b91 | 27 | return USBPHY_INTERFACE_MODE_UNKNOWN; |
1c9af653 | 28 | } |
848d5b91 | 29 | |
1c9af653 MG |
30 | #endif |
31 | ||
32 | #endif /* __LINUX_USB_OF_H */ |