2018-04-18 12:39:51 -07:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
|
|
/*
|
|
|
|
* USB roothub wrapper
|
|
|
|
*
|
|
|
|
* Copyright (C) 2018 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __USB_CORE_PHY_H_
|
|
|
|
#define __USB_CORE_PHY_H_
|
|
|
|
|
2018-04-18 12:39:50 -07:00
|
|
|
struct device;
|
2018-03-03 14:43:04 -07:00
|
|
|
struct usb_phy_roothub;
|
|
|
|
|
2018-04-18 12:39:47 -07:00
|
|
|
struct usb_phy_roothub *usb_phy_roothub_alloc(struct device *dev);
|
2023-12-12 20:10:09 -07:00
|
|
|
struct usb_phy_roothub *usb_phy_roothub_alloc_usb3_phy(struct device *dev);
|
2018-04-18 12:39:47 -07:00
|
|
|
|
|
|
|
int usb_phy_roothub_init(struct usb_phy_roothub *phy_roothub);
|
2018-03-03 14:43:04 -07:00
|
|
|
int usb_phy_roothub_exit(struct usb_phy_roothub *phy_roothub);
|
|
|
|
|
2019-01-29 02:23:40 -07:00
|
|
|
int usb_phy_roothub_set_mode(struct usb_phy_roothub *phy_roothub,
|
|
|
|
enum phy_mode mode);
|
2019-08-28 22:30:27 -07:00
|
|
|
int usb_phy_roothub_calibrate(struct usb_phy_roothub *phy_roothub);
|
2023-12-12 20:10:09 -07:00
|
|
|
int usb_phy_roothub_notify_connect(struct usb_phy_roothub *phy_roothub, int port);
|
|
|
|
int usb_phy_roothub_notify_disconnect(struct usb_phy_roothub *phy_roothub, int port);
|
2018-03-03 14:43:04 -07:00
|
|
|
int usb_phy_roothub_power_on(struct usb_phy_roothub *phy_roothub);
|
|
|
|
void usb_phy_roothub_power_off(struct usb_phy_roothub *phy_roothub);
|
2018-04-18 12:39:48 -07:00
|
|
|
|
|
|
|
int usb_phy_roothub_suspend(struct device *controller_dev,
|
|
|
|
struct usb_phy_roothub *phy_roothub);
|
|
|
|
int usb_phy_roothub_resume(struct device *controller_dev,
|
|
|
|
struct usb_phy_roothub *phy_roothub);
|
2018-04-18 12:39:51 -07:00
|
|
|
|
|
|
|
#endif /* __USB_CORE_PHY_H_ */
|