Add this function so for example USB Host driver can notify the PHY about some event. This is useful for me on i.MX28, where I need to tell the PHY, from the EHCI interrupt handler, to disable disconnection detector (or reenable it). Signed-off-by: Marek Vasut <marex@xxxxxxx> Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx> Cc: Felipe Balbi <balbi@xxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: Linux USB <linux-usb@xxxxxxxxxxxxxxx> --- include/linux/usb/otg.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 38ab3f4..4a74618 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h @@ -117,6 +117,9 @@ struct usb_phy { int (*set_suspend)(struct usb_phy *x, int suspend); + /* for host driver to pass data to the PHY */ + int (*notify)(struct usb_phy *x, + void *data); }; @@ -170,6 +173,15 @@ usb_phy_shutdown(struct usb_phy *x) x->shutdown(x); } +static inline int +usb_phy_notify(struct usb_phy *x, void *data) +{ + if (x->notify) + return x->notify(x, data); + + return 0; +} + /* for usb host and peripheral controller drivers */ #ifdef CONFIG_USB_OTG_UTILS extern struct usb_phy *usb_get_transceiver(void); -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html