otg.h 946 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /* include/linux/usb/otg.h
  3. *
  4. * Copyright (c) 2015 Texas Instruments Incorporated - http://www.ti.com
  5. *
  6. * USB OTG (On The Go) defines
  7. */
  8. #ifndef __LINUX_USB_OTG_H
  9. #define __LINUX_USB_OTG_H
  10. enum usb_dr_mode {
  11. USB_DR_MODE_UNKNOWN,
  12. USB_DR_MODE_HOST,
  13. USB_DR_MODE_PERIPHERAL,
  14. USB_DR_MODE_OTG,
  15. };
  16. /**
  17. * usb_get_dr_mode() - Get dual role mode for given device
  18. * @node: Node offset to the given device
  19. *
  20. * The function gets phy interface string from property 'dr_mode',
  21. * and returns the correspondig enum usb_dr_mode
  22. */
  23. enum usb_dr_mode usb_get_dr_mode(int node);
  24. /**
  25. * usb_get_maximum_speed() - Get maximum speed for given device
  26. * @node: Node offset to the given device
  27. *
  28. * The function gets phy interface string from property 'maximum-speed',
  29. * and returns the correspondig enum usb_device_speed
  30. */
  31. enum usb_device_speed usb_get_maximum_speed(int node);
  32. #endif /* __LINUX_USB_OTG_H */