summaryrefslogtreecommitdiff
path: root/include/linux/usb/msm_hsusb.h
diff options
context:
space:
mode:
authorIvan T. Ivanov <ivan.ivanov@linaro.org>2015-04-09 11:34:22 +0300
committerFelipe Balbi <balbi@ti.com>2015-04-28 19:46:50 +0300
commit591fc116f3302da915bb57d4474a61a5e8884cec (patch)
tree20be8372dfe03c6d3bb2bf626205d72872881ae8 /include/linux/usb/msm_hsusb.h
parent5a294e5469891d0701183049c4a9678887fa7091 (diff)
downloadlinux-591fc116f3302da915bb57d4474a61a5e8884cec.tar.xz
usb: phy: msm: Use extcon framework for VBUS and ID detection
On recent Qualcomm platforms VBUS and ID lines are not routed to USB PHY LINK controller. Use extcon framework to receive connect and disconnect ID and VBUS notification. Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/usb/msm_hsusb.h')
-rw-r--r--include/linux/usb/msm_hsusb.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/usb/msm_hsusb.h b/include/linux/usb/msm_hsusb.h
index 7dbecf9a4656..c4d956e50d09 100644
--- a/include/linux/usb/msm_hsusb.h
+++ b/include/linux/usb/msm_hsusb.h
@@ -18,6 +18,7 @@
#ifndef __ASM_ARCH_MSM_HSUSB_H
#define __ASM_ARCH_MSM_HSUSB_H
+#include <linux/extcon.h>
#include <linux/types.h>
#include <linux/usb/otg.h>
#include <linux/clk.h>
@@ -120,6 +121,17 @@ struct msm_otg_platform_data {
};
/**
+ * struct msm_usb_cable - structure for exteternal connector cable
+ * state tracking
+ * @nb: hold event notification callback
+ * @conn: used for notification registration
+ */
+struct msm_usb_cable {
+ struct notifier_block nb;
+ struct extcon_specific_cable_nb conn;
+};
+
+/**
* struct msm_otg: OTG driver data. Shared by HCD and DCD.
* @otg: USB OTG Transceiver structure.
* @pdata: otg device platform data.
@@ -138,6 +150,8 @@ struct msm_otg_platform_data {
* @chg_type: The type of charger attached.
* @dcd_retires: The retry count used to track Data contact
* detection process.
+ * @vbus: VBUS signal state trakining, using extcon framework
+ * @id: ID signal state trakining, using extcon framework
*/
struct msm_otg {
struct usb_phy phy;
@@ -166,6 +180,9 @@ struct msm_otg {
struct reset_control *phy_rst;
struct reset_control *link_rst;
int vdd_levels[3];
+
+ struct msm_usb_cable vbus;
+ struct msm_usb_cable id;
};
#endif