diff options
Diffstat (limited to 'include/linux/usb')
-rw-r--r-- | include/linux/usb/otg.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h index 0cb2ec2e50c0..45824be0a2f9 100644 --- a/include/linux/usb/otg.h +++ b/include/linux/usb/otg.h | |||
@@ -128,6 +128,9 @@ struct usb_phy { | |||
128 | int (*set_suspend)(struct usb_phy *x, | 128 | int (*set_suspend)(struct usb_phy *x, |
129 | int suspend); | 129 | int suspend); |
130 | 130 | ||
131 | /* notify phy connect status change */ | ||
132 | int (*notify_connect)(struct usb_phy *x, int port); | ||
133 | int (*notify_disconnect)(struct usb_phy *x, int port); | ||
131 | }; | 134 | }; |
132 | 135 | ||
133 | 136 | ||
@@ -277,6 +280,24 @@ usb_phy_set_suspend(struct usb_phy *x, int suspend) | |||
277 | } | 280 | } |
278 | 281 | ||
279 | static inline int | 282 | static inline int |
283 | usb_phy_notify_connect(struct usb_phy *x, int port) | ||
284 | { | ||
285 | if (x->notify_connect) | ||
286 | return x->notify_connect(x, port); | ||
287 | else | ||
288 | return 0; | ||
289 | } | ||
290 | |||
291 | static inline int | ||
292 | usb_phy_notify_disconnect(struct usb_phy *x, int port) | ||
293 | { | ||
294 | if (x->notify_disconnect) | ||
295 | return x->notify_disconnect(x, port); | ||
296 | else | ||
297 | return 0; | ||
298 | } | ||
299 | |||
300 | static inline int | ||
280 | otg_start_srp(struct usb_otg *otg) | 301 | otg_start_srp(struct usb_otg *otg) |
281 | { | 302 | { |
282 | if (otg && otg->start_srp) | 303 | if (otg && otg->start_srp) |