/* SPDX-License-Identifier: GPL-2.0 */ /* * USB PHY defines * * These APIs may be used between USB controllers. USB device drivers * (for either host or peripheral roles) don't use these calls; they * continue to use just usb_device and usb_gadget.
*/
/* for phys connected thru an ULPI interface, the user must * provide access ops
*/ struct usb_phy_io_ops { int (*read)(struct usb_phy *x, u32 reg); int (*write)(struct usb_phy *x, u32 val, u32 reg);
};
/* Support USB charger */ enum usb_charger_type chg_type; enum usb_charger_state chg_state; struct usb_charger_current chg_cur; struct work_struct chg_work;
/* for notification of usb_phy_events */ struct atomic_notifier_head notifier;
/* to pass extra port status to the root hub */
u16 port_status;
u16 port_change;
/* to support controllers that have multiple phys */ struct list_head head;
/* initialize/shutdown the phy */ int (*init)(struct usb_phy *x); void (*shutdown)(struct usb_phy *x);
/* enable/disable VBUS */ int (*set_vbus)(struct usb_phy *x, int on);
/* effective for B devices, ignored for A-peripheral */ int (*set_power)(struct usb_phy *x, unsigned mA);
/* Set phy into suspend mode */ int (*set_suspend)(struct usb_phy *x, int suspend);
/* * Set wakeup enable for PHY, in that case, the PHY can be * woken up from suspend status due to external events, * like vbus change, dp/dm change and id.
*/ int (*set_wakeup)(struct usb_phy *x, bool enabled);
/* notify phy connect status change */ int (*notify_connect)(struct usb_phy *x, enum usb_device_speed speed); int (*notify_disconnect)(struct usb_phy *x, enum usb_device_speed speed);
/* * Charger detection method can be implemented if you need to * manually detect the charger type.
*/ enum usb_charger_type (*charger_detect)(struct usb_phy *x);
};
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.