of.h 611 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * OF helpers for usb devices.
  3. *
  4. * This file is released under the GPLv2
  5. */
  6. #ifndef __LINUX_USB_OF_H
  7. #define __LINUX_USB_OF_H
  8. #include <linux/usb/otg.h>
  9. #include <linux/usb/phy.h>
  10. #ifdef CONFIG_OF
  11. enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np);
  12. enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np);
  13. #else
  14. static inline enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np)
  15. {
  16. return USBPHY_INTERFACE_MODE_UNKNOWN;
  17. }
  18. static inline enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np)
  19. {
  20. return USB_DR_MODE_UNKNOWN;
  21. }
  22. #endif
  23. #endif /* __LINUX_USB_OF_H */