summaryrefslogtreecommitdiffstats
path: root/drivers/usb/phy/phy-generic.h
diff options
context:
space:
mode:
authorRobert Jarzmik <robert.jarzmik@free.fr>2014-12-06 22:05:15 +0100
committerFelipe Balbi <balbi@ti.com>2015-01-12 19:13:29 +0100
commit7acc9973e3c42de9926b28eec8ae3434dfdde3be (patch)
tree48cc00abfbbb8608577bd186aec7b0b5094cc797 /drivers/usb/phy/phy-generic.h
parentusb: phy: nop: device tree documentation for vbus (diff)
downloadlinux-7acc9973e3c42de9926b28eec8ae3434dfdde3be.tar.xz
linux-7acc9973e3c42de9926b28eec8ae3434dfdde3be.zip
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 <robert.jarzmik@free.fr> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/phy/phy-generic.h')
-rw-r--r--drivers/usb/phy/phy-generic.h6
1 files changed, 6 insertions, 0 deletions
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 <linux/usb/usb_phy_generic.h>
#include <linux/gpio/consumer.h>
+#include <linux/regulator/consumer.h>
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);