xhci-mtk-power.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef _XHCI_MTK_POWER_H
  2. #define _XHCI_MTK_POWER_H
  3. #include <linux/usb.h>
  4. void enableXhciAllPortPower(struct xhci_hcd *xhci);
  5. void disableXhciAllPortPower(struct xhci_hcd *xhci);
  6. void enableAllClockPower(struct xhci_hcd *xhci, bool is_reset);
  7. void disableAllClockPower(struct xhci_hcd *xhci);
  8. #if 0
  9. void disablePortClockPower(int port_index, int port_rev);
  10. void enablePortClockPower(int port_index, int port_rev);
  11. #endif
  12. #ifdef CONFIG_USB_MTK_DUALMODE
  13. void mtk_switch2host(void);
  14. void mtk_switch2device(bool skip);
  15. #endif
  16. #ifdef CONFIG_MTK_BQ25896_SUPPORT
  17. extern void bq25890_set_boost_ilim(unsigned int val);
  18. extern void bq25890_otg_en(unsigned int val);
  19. #endif
  20. #ifdef CONFIG_MTK_OTG_PMIC_BOOST_5V
  21. extern unsigned int pmic_read_interface(unsigned int RegNum, unsigned int *val, unsigned int MASK, unsigned int SHIFT);
  22. extern unsigned int pmic_config_interface(unsigned int RegNum, unsigned int val, unsigned int MASK, unsigned int SHIFT);
  23. #endif
  24. #if defined(CONFIG_MTK_BQ25896_SUPPORT) \
  25. || defined(CONFIG_MTK_OTG_PMIC_BOOST_5V)
  26. #define MTK_OTG_BOOST_5V_SUPPORT
  27. #endif
  28. #endif