otg.h 813 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (C) 2013-2014 Freescale Semiconductor, Inc.
  3. *
  4. * Author: Peter Chen
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef __DRIVERS_USB_CHIPIDEA_OTG_H
  11. #define __DRIVERS_USB_CHIPIDEA_OTG_H
  12. u32 hw_read_otgsc(struct ci_hdrc *ci, u32 mask);
  13. void hw_write_otgsc(struct ci_hdrc *ci, u32 mask, u32 data);
  14. int ci_hdrc_otg_init(struct ci_hdrc *ci);
  15. void ci_hdrc_otg_destroy(struct ci_hdrc *ci);
  16. enum ci_role ci_otg_role(struct ci_hdrc *ci);
  17. void ci_handle_vbus_change(struct ci_hdrc *ci);
  18. static inline void ci_otg_queue_work(struct ci_hdrc *ci)
  19. {
  20. disable_irq_nosync(ci->irq);
  21. queue_work(ci->wq, &ci->work);
  22. }
  23. #endif /* __DRIVERS_USB_CHIPIDEA_OTG_H */