diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h index 6809aaa6dfa4..4f05705ba9b5 100644 --- a/include/linux/usb/phy.h +++ b/include/linux/usb/phy.h @@ -171,6 +171,7 @@ struct usb_phy { /* reset the PHY clocks */ int (*reset)(struct usb_phy *x); + int (*drive_dp_pulse)(struct usb_phy *x, unsigned int pulse_width); }; /* for board-specific init logic */ @@ -238,6 +239,15 @@ usb_phy_reset(struct usb_phy *x) return 0; } +static inline int +usb_phy_drive_dp_pulse(struct usb_phy *x, unsigned int pulse_width) +{ + if (x && x->drive_dp_pulse) + return x->drive_dp_pulse(x, pulse_width); + + return 0; +} + /* for usb host and peripheral controller drivers */ #if IS_ENABLED(CONFIG_USB_PHY) extern struct usb_phy *usb_get_phy(enum usb_phy_type type);