diff options
Diffstat (limited to 'include/linux/usb/phy.h')
| -rw-r--r-- | include/linux/usb/phy.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h index 6b5978f5763..586152a6829 100644 --- a/include/linux/usb/phy.h +++ b/include/linux/usb/phy.h @@ -94,6 +94,10 @@ struct usb_phy { /* enable/disable VBUS */ int (*set_vbus)(struct usb_phy *x, int on); + /* hold/unhold usb controller in reset */ + int (*hw_reset)(struct usb_phy *x, + int enable); + /* effective for B devices, ignored for A-peripheral */ int (*set_power)(struct usb_phy *x, unsigned mA); @@ -181,6 +185,15 @@ usb_phy_vbus_off(struct usb_phy *x) return x->set_vbus(x, false); } +static inline int +usb_phy_reset(struct usb_phy *x, int enable) +{ + if (!x->hw_reset) + return 0; + + return x->hw_reset(x, enable); +} + /* 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); |