|
@@ -128,6 +128,9 @@ struct usb_phy {
|
|
|
int (*set_suspend)(struct usb_phy *x,
|
|
|
int suspend);
|
|
|
|
|
|
+ /* notify phy connect status change */
|
|
|
+ int (*notify_connect)(struct usb_phy *x, int port);
|
|
|
+ int (*notify_disconnect)(struct usb_phy *x, int port);
|
|
|
};
|
|
|
|
|
|
|
|
@@ -276,6 +279,24 @@ usb_phy_set_suspend(struct usb_phy *x, int suspend)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static inline int
|
|
|
+usb_phy_notify_connect(struct usb_phy *x, int port)
|
|
|
+{
|
|
|
+ if (x->notify_connect)
|
|
|
+ return x->notify_connect(x, port);
|
|
|
+ else
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static inline int
|
|
|
+usb_phy_notify_disconnect(struct usb_phy *x, int port)
|
|
|
+{
|
|
|
+ if (x->notify_disconnect)
|
|
|
+ return x->notify_disconnect(x, port);
|
|
|
+ else
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
static inline int
|
|
|
otg_start_srp(struct usb_otg *otg)
|
|
|
{
|