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 13 #if IS_ENABLED(CONFIG_OF) 14 enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np); 15 #else 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 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 30 #endif 31 32 #endif /* __LINUX_USB_OF_H */ 33