blob: 0d0eadd54ed9a4205c1dec8248d9aa5d7aad9d84 [file] [log] [blame]
Sebastian Andrzej Siewior53b6fc22013-07-30 17:20:06 +02001#ifndef _PHY_GENERIC_H_
2#define _PHY_GENERIC_H_
3
Felipe Balbid7078df2014-04-16 15:28:32 -05004#include <linux/usb/usb_phy_generic.h>
Robert Jarzmike9f2cefb2014-12-06 22:05:13 +01005#include <linux/gpio/consumer.h>
Robert Jarzmik7acc9972014-12-06 22:05:15 +01006#include <linux/regulator/consumer.h>
Felipe Balbiaf9f51c2013-10-24 09:45:29 -05007
Felipe Balbi4525bee2014-04-16 15:20:44 -05008struct usb_phy_generic {
Sebastian Andrzej Siewior53b6fc22013-07-30 17:20:06 +02009 struct usb_phy phy;
10 struct device *dev;
11 struct clk *clk;
12 struct regulator *vcc;
Robert Jarzmike9f2cefb2014-12-06 22:05:13 +010013 struct gpio_desc *gpiod_reset;
Robert Jarzmik7acc9972014-12-06 22:05:15 +010014 struct gpio_desc *gpiod_vbus;
15 struct regulator *vbus_draw;
16 bool vbus_draw_enabled;
17 unsigned long mA;
18 unsigned int vbus;
Sebastian Andrzej Siewior53b6fc22013-07-30 17:20:06 +020019};
20
21int usb_gen_phy_init(struct usb_phy *phy);
22void usb_gen_phy_shutdown(struct usb_phy *phy);
23
Felipe Balbi4525bee2014-04-16 15:20:44 -050024int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop,
25 struct usb_phy_generic_platform_data *pdata);
Sebastian Andrzej Siewior53b6fc22013-07-30 17:20:06 +020026
27#endif