From 7acc9973e3c42de9926b28eec8ae3434dfdde3be Mon Sep 17 00:00:00 2001 From: Robert Jarzmik Date: Sat, 6 Dec 2014 22:05:15 +0100 Subject: usb: phy: generic: add vbus support Add support for vbus detection and power supply. This code is more or less stolen from phy-gpio-vbus-usb.c, and aims at providing a detection mechanism for VBus (ie. usb cable plug) based on a GPIO line, and a power supply activation which draws current from the VBus. [ balbi@ti.com : fix build break ] Signed-off-by: Robert Jarzmik Signed-off-by: Felipe Balbi --- drivers/usb/phy/phy-generic.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/usb/phy/phy-generic.h') diff --git a/drivers/usb/phy/phy-generic.h b/drivers/usb/phy/phy-generic.h index 09924fdaaabe..0d0eadd54ed9 100644 --- a/drivers/usb/phy/phy-generic.h +++ b/drivers/usb/phy/phy-generic.h @@ -3,6 +3,7 @@ #include #include +#include struct usb_phy_generic { struct usb_phy phy; @@ -10,6 +11,11 @@ struct usb_phy_generic { struct clk *clk; struct regulator *vcc; struct gpio_desc *gpiod_reset; + struct gpio_desc *gpiod_vbus; + struct regulator *vbus_draw; + bool vbus_draw_enabled; + unsigned long mA; + unsigned int vbus; }; int usb_gen_phy_init(struct usb_phy *phy); -- cgit v1.2.1