From 13d5de7b1134d987b076f54ceedec89f49c4bd8c Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Sat, 7 Jul 2012 22:56:44 +0800 Subject: [PATCH] --- yaml --- r: 317004 b: refs/heads/master c: 526c51382d59144a3704970ab111d668e604a10f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/usb/otg.h | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 45d9502b0840..c74f8571e4b3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ca72ae9bf6b599519576142b4cb209aa79bbf867 +refs/heads/master: 526c51382d59144a3704970ab111d668e604a10f diff --git a/trunk/include/linux/usb/otg.h b/trunk/include/linux/usb/otg.h index 0cb2ec2e50c0..45824be0a2f9 100644 --- a/trunk/include/linux/usb/otg.h +++ b/trunk/include/linux/usb/otg.h @@ -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) {