summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMaya Erez <merez@codeaurora.org>2013-12-09 23:15:30 +0200
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:06:08 -0700
commit5bf0c1d26a0dc6f4640e381e0029456add62c91a (patch)
tree0187a7afd55cb0c85b4f278212c61ab1ad1ff816 /include
parentd827d49e650bc3279b7e34b3aacce87c52db34cb (diff)
usb: phy: Expose new PHY callback for performing PHY reset
Add a new PHY callback for performing PHY reset, which is required by some targets during their initialization sequence. As usb_phy_reset name was already in use by local msm PHY APIs, change the previous usb_phy_reset to msm_usb_phy_reset. Change-Id: Ieb5099d12e107c123d8889058aa564d0b091d6f9 Signed-off-by: Maya Erez <merez@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/phy.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index 31a8068c42a5..606402e14db6 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -122,6 +122,9 @@ struct usb_phy {
enum usb_device_speed speed);
int (*notify_disconnect)(struct usb_phy *x,
enum usb_device_speed speed);
+
+ /* reset the PHY clocks */
+ int (*reset)(struct usb_phy *x);
};
/**
@@ -196,6 +199,15 @@ usb_phy_vbus_off(struct usb_phy *x)
return x->set_vbus(x, false);
}
+static inline int
+usb_phy_reset(struct usb_phy *x)
+{
+ if (x && x->reset)
+ return x->reset(x);
+
+ return 0;
+}
+
/* for usb host and peripheral controller drivers */
#if IS_ENABLED(CONFIG_USB_PHY)
extern struct usb_phy *usb_get_phy(enum usb_phy_type type);