1 From 7306c576fd8463f915192e68b7d0b93a24d43c9e Mon Sep 17 00:00:00 2001
2 From: Peter Chen <peter.chen@freescale.com>
3 Date: Mon, 16 Sep 2013 16:31:24 +0800
4 Subject: [PATCH] MLK-11340-26 usb: phy: add notify suspend and resume callback
6 They are used to notify PHY that the controller enters suspend
9 Signed-off-by: Peter Chen <peter.chen@freescale.com>
11 include/linux/usb/phy.h | 24 ++++++++++++++++++++++++
12 1 file changed, 24 insertions(+)
14 --- a/include/linux/usb/phy.h
15 +++ b/include/linux/usb/phy.h
16 @@ -155,6 +155,12 @@ struct usb_phy {
17 * manually detect the charger type.
19 enum usb_charger_type (*charger_detect)(struct usb_phy *x);
21 + int (*notify_suspend)(struct usb_phy *x,
22 + enum usb_device_speed speed);
23 + int (*notify_resume)(struct usb_phy *x,
24 + enum usb_device_speed speed);
28 /* for board-specific init logic */
29 @@ -333,6 +339,24 @@ usb_phy_notify_disconnect(struct usb_phy
34 +static inline int usb_phy_notify_suspend
35 + (struct usb_phy *x, enum usb_device_speed speed)
37 + if (x && x->notify_suspend)
38 + return x->notify_suspend(x, speed);
43 +static inline int usb_phy_notify_resume
44 + (struct usb_phy *x, enum usb_device_speed speed)
46 + if (x && x->notify_resume)
47 + return x->notify_resume(x, speed);