of.h 690 B

1234567891011121314151617181920212223242526272829303132
  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. #if IS_ENABLED(CONFIG_OF)
  11. enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np);
  12. #else
  13. static inline enum usb_dr_mode of_usb_get_dr_mode(struct device_node *np)
  14. {
  15. return USB_DR_MODE_UNKNOWN;
  16. }
  17. #endif
  18. #if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_USB_PHY)
  19. enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np);
  20. #else
  21. static inline enum usb_phy_interface of_usb_get_phy_mode(struct device_node *np)
  22. {
  23. return USBPHY_INTERFACE_MODE_UNKNOWN;
  24. }
  25. #endif
  26. #endif /* __LINUX_USB_OF_H */