aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorIvan T. Ivanov <ivan.ivanov@linaro.org>2015-04-09 04:34:22 -0400
committerFelipe Balbi <balbi@ti.com>2015-04-28 12:46:50 -0400
commit591fc116f3302da915bb57d4474a61a5e8884cec (patch)
tree20be8372dfe03c6d3bb2bf626205d72872881ae8 /include/linux/usb
parent5a294e5469891d0701183049c4a9678887fa7091 (diff)
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')
-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 @@
18#ifndef __ASM_ARCH_MSM_HSUSB_H 18#ifndef __ASM_ARCH_MSM_HSUSB_H
19#define __ASM_ARCH_MSM_HSUSB_H 19#define __ASM_ARCH_MSM_HSUSB_H
20 20
21#include <linux/extcon.h>
21#include <linux/types.h> 22#include <linux/types.h>
22#include <linux/usb/otg.h> 23#include <linux/usb/otg.h>
23#include <linux/clk.h> 24#include <linux/clk.h>
@@ -120,6 +121,17 @@ struct msm_otg_platform_data {
120}; 121};
121 122
122/** 123/**
124 * struct msm_usb_cable - structure for exteternal connector cable
125 * state tracking
126 * @nb: hold event notification callback
127 * @conn: used for notification registration
128 */
129struct msm_usb_cable {
130 struct notifier_block nb;
131 struct extcon_specific_cable_nb conn;
132};
133
134/**
123 * struct msm_otg: OTG driver data. Shared by HCD and DCD. 135 * struct msm_otg: OTG driver data. Shared by HCD and DCD.
124 * @otg: USB OTG Transceiver structure. 136 * @otg: USB OTG Transceiver structure.
125 * @pdata: otg device platform data. 137 * @pdata: otg device platform data.
@@ -138,6 +150,8 @@ struct msm_otg_platform_data {
138 * @chg_type: The type of charger attached. 150 * @chg_type: The type of charger attached.
139 * @dcd_retires: The retry count used to track Data contact 151 * @dcd_retires: The retry count used to track Data contact
140 * detection process. 152 * detection process.
153 * @vbus: VBUS signal state trakining, using extcon framework
154 * @id: ID signal state trakining, using extcon framework
141 */ 155 */
142struct msm_otg { 156struct msm_otg {
143 struct usb_phy phy; 157 struct usb_phy phy;
@@ -166,6 +180,9 @@ struct msm_otg {
166 struct reset_control *phy_rst; 180 struct reset_control *phy_rst;
167 struct reset_control *link_rst; 181 struct reset_control *link_rst;
168 int vdd_levels[3]; 182 int vdd_levels[3];
183
184 struct msm_usb_cable vbus;
185 struct msm_usb_cable id;
169}; 186};
170 187
171#endif 188#endif