Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Sebastian Andrzej Siewior | 53b6fc2 | 2013-07-30 17:20:06 +0200 | [diff] [blame] | 2 | #ifndef _PHY_GENERIC_H_ |
| 3 | #define _PHY_GENERIC_H_ |
| 4 | |
Felipe Balbi | d7078df | 2014-04-16 15:28:32 -0500 | [diff] [blame] | 5 | #include <linux/usb/usb_phy_generic.h> |
Robert Jarzmik | e9f2cefb | 2014-12-06 22:05:13 +0100 | [diff] [blame] | 6 | #include <linux/gpio/consumer.h> |
Robert Jarzmik | 7acc997 | 2014-12-06 22:05:15 +0100 | [diff] [blame] | 7 | #include <linux/regulator/consumer.h> |
Felipe Balbi | af9f51c | 2013-10-24 09:45:29 -0500 | [diff] [blame] | 8 | |
Felipe Balbi | 4525bee | 2014-04-16 15:20:44 -0500 | [diff] [blame] | 9 | struct usb_phy_generic { |
Sebastian Andrzej Siewior | 53b6fc2 | 2013-07-30 17:20:06 +0200 | [diff] [blame] | 10 | struct usb_phy phy; |
| 11 | struct device *dev; |
| 12 | struct clk *clk; |
| 13 | struct regulator *vcc; |
Robert Jarzmik | e9f2cefb | 2014-12-06 22:05:13 +0100 | [diff] [blame] | 14 | struct gpio_desc *gpiod_reset; |
Robert Jarzmik | 7acc997 | 2014-12-06 22:05:15 +0100 | [diff] [blame] | 15 | struct gpio_desc *gpiod_vbus; |
| 16 | struct regulator *vbus_draw; |
| 17 | bool vbus_draw_enabled; |
| 18 | unsigned long mA; |
| 19 | unsigned int vbus; |
Sebastian Andrzej Siewior | 53b6fc2 | 2013-07-30 17:20:06 +0200 | [diff] [blame] | 20 | }; |
| 21 | |
| 22 | int usb_gen_phy_init(struct usb_phy *phy); |
| 23 | void usb_gen_phy_shutdown(struct usb_phy *phy); |
| 24 | |
Felipe Balbi | 4525bee | 2014-04-16 15:20:44 -0500 | [diff] [blame] | 25 | int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop, |
| 26 | struct usb_phy_generic_platform_data *pdata); |
Sebastian Andrzej Siewior | 53b6fc2 | 2013-07-30 17:20:06 +0200 | [diff] [blame] | 27 | |
| 28 | #endif |