phy-sun4i-usb.h 863 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (C) 2017 Jagan Teki <jagan@amarulasolutions.com>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef __GENERIC_PHY_SUN4I_USB_H
  7. #define __GENERIC_PHY_SUN4I_USB_H
  8. /**
  9. * sun4i_usb_phy_id_detect - detect ID pin of USB PHY
  10. *
  11. * @phy: USB PHY port to detect ID pin
  12. * @return 0 if OK, or a negative error code
  13. */
  14. int sun4i_usb_phy_id_detect(struct phy *phy);
  15. /**
  16. * sun4i_usb_phy_vbus_detect - detect VBUS pin of USB PHY
  17. *
  18. * @phy: USB PHY port to detect VBUS pin
  19. * @return 0 if OK, or a negative error code
  20. */
  21. int sun4i_usb_phy_vbus_detect(struct phy *phy);
  22. /**
  23. * sun4i_usb_phy_set_squelch_detect() - Enable/disable squelch detect
  24. *
  25. * @phy: reference to a sun4i usb phy
  26. * @enabled: wether to enable or disable squelch detect
  27. */
  28. void sun4i_usb_phy_set_squelch_detect(struct phy *phy, bool enabled);
  29. #endif /*__GENERIC_PHY_SUN4I_USB_H */