153b6fc28SSebastian Andrzej Siewior #ifndef _PHY_GENERIC_H_ 253b6fc28SSebastian Andrzej Siewior #define _PHY_GENERIC_H_ 353b6fc28SSebastian Andrzej Siewior 4d7078df6SFelipe Balbi #include <linux/usb/usb_phy_generic.h> 5e9f2cefbSRobert Jarzmik #include <linux/gpio/consumer.h> 6*7acc9973SRobert Jarzmik #include <linux/regulator/consumer.h> 7af9f51c5SFelipe Balbi 84525beebSFelipe Balbi struct usb_phy_generic { 953b6fc28SSebastian Andrzej Siewior struct usb_phy phy; 1053b6fc28SSebastian Andrzej Siewior struct device *dev; 1153b6fc28SSebastian Andrzej Siewior struct clk *clk; 1253b6fc28SSebastian Andrzej Siewior struct regulator *vcc; 13e9f2cefbSRobert Jarzmik struct gpio_desc *gpiod_reset; 14*7acc9973SRobert Jarzmik struct gpio_desc *gpiod_vbus; 15*7acc9973SRobert Jarzmik struct regulator *vbus_draw; 16*7acc9973SRobert Jarzmik bool vbus_draw_enabled; 17*7acc9973SRobert Jarzmik unsigned long mA; 18*7acc9973SRobert Jarzmik unsigned int vbus; 1953b6fc28SSebastian Andrzej Siewior }; 2053b6fc28SSebastian Andrzej Siewior 2153b6fc28SSebastian Andrzej Siewior int usb_gen_phy_init(struct usb_phy *phy); 2253b6fc28SSebastian Andrzej Siewior void usb_gen_phy_shutdown(struct usb_phy *phy); 2353b6fc28SSebastian Andrzej Siewior 244525beebSFelipe Balbi int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop, 254525beebSFelipe Balbi struct usb_phy_generic_platform_data *pdata); 2653b6fc28SSebastian Andrzej Siewior 2753b6fc28SSebastian Andrzej Siewior #endif 28