phy-generic.h 693 B

1234567891011121314151617181920212223242526272829
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _PHY_GENERIC_H_
  3. #define _PHY_GENERIC_H_
  4. #include <linux/usb/usb_phy_generic.h>
  5. #include <linux/gpio/consumer.h>
  6. #include <linux/regulator/consumer.h>
  7. struct usb_phy_generic {
  8. struct usb_phy phy;
  9. struct device *dev;
  10. struct clk *clk;
  11. struct regulator *vcc;
  12. struct gpio_desc *gpiod_reset;
  13. struct gpio_desc *gpiod_vbus;
  14. struct regulator *vbus_draw;
  15. bool vbus_draw_enabled;
  16. unsigned long mA;
  17. unsigned int vbus;
  18. };
  19. int usb_gen_phy_init(struct usb_phy *phy);
  20. void usb_gen_phy_shutdown(struct usb_phy *phy);
  21. int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
  22. struct usb_phy_generic_platform_data *pdata);
  23. #endif