Loading...
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _PHY_GENERIC_H_
3#define _PHY_GENERIC_H_
4
5#include <linux/usb/usb_phy_generic.h>
6#include <linux/gpio/consumer.h>
7#include <linux/regulator/consumer.h>
8
9struct usb_phy_generic {
10 struct usb_phy phy;
11 struct device *dev;
12 struct clk *clk;
13 struct regulator *vcc;
14 struct gpio_desc *gpiod_reset;
15 struct gpio_desc *gpiod_vbus;
16 struct regulator *vbus_draw;
17 bool vbus_draw_enabled;
18 unsigned long mA;
19 unsigned int vbus;
20};
21
22int usb_gen_phy_init(struct usb_phy *phy);
23void usb_gen_phy_shutdown(struct usb_phy *phy);
24
25int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_generic *nop);
26
27#endif
1#ifndef _PHY_GENERIC_H_
2#define _PHY_GENERIC_H_
3
4#include <linux/usb/usb_phy_gen_xceiv.h>
5
6struct usb_phy_gen_xceiv {
7 struct usb_phy phy;
8 struct device *dev;
9 struct clk *clk;
10 struct regulator *vcc;
11 int gpio_reset;
12 bool reset_active_low;
13};
14
15int usb_gen_phy_init(struct usb_phy *phy);
16void usb_gen_phy_shutdown(struct usb_phy *phy);
17
18int usb_phy_gen_create_phy(struct device *dev, struct usb_phy_gen_xceiv *nop,
19 struct usb_phy_gen_xceiv_platform_data *pdata);
20
21#endif