// SPDX-License-Identifier: GPL-2.0+ /* * A wrapper for multiple PHYs which passes all phy_* function calls to * multiple (actual) PHY devices. This is comes handy when initializing * all PHYs on a HCD and to keep them all in the same state. * * Copyright (C) 2018 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
*/
/** * usb_phy_roothub_alloc_usb3_phy - alloc the roothub * @dev: the device of the host controller * * Allocate the usb phy roothub if the host use a generic usb3-phy. * * Return: On success, a pointer to the usb_phy_roothub. Otherwise, * %NULL if no use usb3 phy or %-ENOMEM if out of memory.
*/ struct usb_phy_roothub *usb_phy_roothub_alloc_usb3_phy(struct device *dev)
{ struct usb_phy_roothub *phy_roothub; int num_phys;
/** * usb_phy_roothub_notify_connect() - connect notification * @phy_roothub: the phy of roothub, if the host use a generic phy. * @port: the port index for connect * * If the phy needs to get connection status, the callback can be used. * Returns: %0 if successful, a negative error code otherwise
*/ int usb_phy_roothub_notify_connect(struct usb_phy_roothub *phy_roothub, int port)
{ struct usb_phy_roothub *roothub_entry; struct list_head *head; int err;
/** * usb_phy_roothub_notify_disconnect() - disconnect notification * @phy_roothub: the phy of roothub, if the host use a generic phy. * @port: the port index for disconnect * * If the phy needs to get connection status, the callback can be used. * Returns: %0 if successful, a negative error code otherwise
*/ int usb_phy_roothub_notify_disconnect(struct usb_phy_roothub *phy_roothub, int port)
{ struct usb_phy_roothub *roothub_entry; struct list_head *head; int err;
int usb_phy_roothub_resume(struct device *controller_dev, struct usb_phy_roothub *phy_roothub)
{ int err;
/* if the device can't wake up the system _exit was called */ if (!device_may_wakeup(controller_dev)) {
err = usb_phy_roothub_init(phy_roothub); if (err) return err;
}
err = usb_phy_roothub_power_on(phy_roothub);
/* undo _init if _power_on failed */ if (err && !device_may_wakeup(controller_dev))
usb_phy_roothub_exit(phy_roothub);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.