|
|
|
Re: [PATCH 1/4] PHY: Add .notify() into struct usb_phy | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
|
So it would be like below:
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index 38ab3f4..b40652b 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -117,6 +117,10 @@ struct usb_phy {
int (*set_suspend)(struct usb_phy *x,
int suspend);
+ /* notify phy connect status change */
+ int (*notify_connect_change)(struct usb_phy *x,
+ int port,
+ int connected);
};
@@ -252,6 +256,15 @@ usb_phy_set_suspend(struct usb_phy *x, int suspend)
}
static inline int
+usb_phy_notify_connect_change(struct usb_phy *x, int port int connected)
+{
+ if (x->notify_connect_change!= NULL)
+ return x->notify_connect_change(x, port, connected);
+ else
+ return 0;
+}
+
+static inline int
otg_start_srp(struct usb_otg *otg)
{
if (otg && otg->start_srp)
Thanks
Richard
--
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

[Linux Media] [Video for Linux] [Linux Input] [Linux Audio Users] [Photo] [Yosemite News] [Yosemite Photos] [Free Online Dating] [Linux Kernel] [Linux SCSI] [Old Linux USB Devel Archive] [More Archives]
![]() |
![]() |