1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 253b6fc28SSebastian Andrzej Siewior #ifndef _PHY_GENERIC_H_ 353b6fc28SSebastian Andrzej Siewior #define _PHY_GENERIC_H_ 453b6fc28SSebastian Andrzej Siewior 5d7078df6SFelipe Balbi #include <linux/usb/usb_phy_generic.h> 6e9f2cefbSRobert Jarzmik #include <linux/gpio/consumer.h> 77acc9973SRobert Jarzmik #include <linux/regulator/consumer.h> 8af9f51c5SFelipe Balbi 94525beebSFelipe Balbi struct usb_phy_generic { 1053b6fc28SSebastian Andrzej Siewior struct usb_phy phy; 1153b6fc28SSebastian Andrzej Siewior struct device *dev; 1253b6fc28SSebastian Andrzej Siewior struct clk *clk; 1353b6fc28SSebastian Andrzej Siewior struct regulator *vcc; 14e9f2cefbSRobert Jarzmik struct gpio_desc *gpiod_reset; 157acc9973SRobert Jarzmik struct gpio_desc *gpiod_vbus; 167acc9973SRobert Jarzmik struct regulator *vbus_draw; 177acc9973SRobert Jarzmik bool vbus_draw_enabled; 187acc9973SRobert Jarzmik unsigned long mA; 197acc9973SRobert Jarzmik unsigned int vbus; 2053b6fc28SSebastian Andrzej Siewior }; 2153b6fc28SSebastian Andrzej Siewior 2253b6fc28SSebastian Andrzej Siewior int usb_gen_phy_init(struct usb_phy *phy); 2353b6fc28SSebastian Andrzej Siewior void usb_gen_phy_shutdown(struct usb_phy *phy); 2453b6fc28SSebastian Andrzej Siewior 254525beebSFelipe Balbi int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop, 264525beebSFelipe Balbi struct usb_phy_generic_platform_data *pdata); 2753b6fc28SSebastian Andrzej Siewior 2853b6fc28SSebastian Andrzej Siewior #endif 29