Michael Grzeschik | 1c9af65 | 2013-06-13 17:59:55 +0300 | [diff] [blame] | 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 | |
Peter Chen | 848d5b9 | 2013-06-24 09:25:59 +0800 | [diff] [blame] | 13 | #if IS_ENABLED(CONFIG_OF) |
Michael Grzeschik | 1c9af65 | 2013-06-13 17:59:55 +0300 | [diff] [blame] | 14 | enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np); |
| 15 | #else |
Peter Chen | 848d5b9 | 2013-06-24 09:25:59 +0800 | [diff] [blame] | 16 | static inline enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np) |
| 17 | { |
| 18 | return USB_DR_MODE_UNKNOWN; |
| 19 | } |
| 20 | #endif |
| 21 | |
| 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 |
Michael Grzeschik | 1c9af65 | 2013-06-13 17:59:55 +0300 | [diff] [blame] | 25 | static inline enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np) |
| 26 | { |
| 27 | return USBPHY_INTERFACE_MODE_UNKNOWN; |
| 28 | } |
| 29 | |
Michael Grzeschik | 1c9af65 | 2013-06-13 17:59:55 +0300 | [diff] [blame] | 30 | #endif |
| 31 | |
| 32 | #endif /* __LINUX_USB_OF_H */ |