chipidea.h 1004 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Platform data for the chipidea USB dual role controller
  3. */
  4. #ifndef __LINUX_USB_CHIPIDEA_H
  5. #define __LINUX_USB_CHIPIDEA_H
  6. #include <linux/usb/otg.h>
  7. struct ci13xxx;
  8. struct ci13xxx_platform_data {
  9. const char *name;
  10. /* offset of the capability registers */
  11. uintptr_t capoffset;
  12. unsigned power_budget;
  13. struct usb_phy *phy;
  14. unsigned long flags;
  15. #define CI13XXX_REGS_SHARED BIT(0)
  16. #define CI13XXX_REQUIRE_TRANSCEIVER BIT(1)
  17. #define CI13XXX_PULLUP_ON_VBUS BIT(2)
  18. #define CI13XXX_DISABLE_STREAMING BIT(3)
  19. #define CI13XXX_CONTROLLER_RESET_EVENT 0
  20. #define CI13XXX_CONTROLLER_STOPPED_EVENT 1
  21. void (*notify_event) (struct ci13xxx *ci, unsigned event);
  22. };
  23. /* Default offset of capability registers */
  24. #define DEF_CAPOFFSET 0x100
  25. /* Add ci13xxx device */
  26. struct platform_device *ci13xxx_add_device(struct device *dev,
  27. struct resource *res, int nres,
  28. struct ci13xxx_platform_data *platdata);
  29. /* Remove ci13xxx device */
  30. void ci13xxx_remove_device(struct platform_device *pdev);
  31. #endif