aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorIvan T. Ivanov <ivan.ivanov@linaro.org>2015-09-07 07:45:25 -0400
committerPeter Chen <peter.chen@freescale.com>2015-10-21 21:24:25 -0400
commit3ecb3e09b042e70799ff3a1ff464a5ecaa7547d9 (patch)
treefea2789cc3e67fac569c9a47d7035b1e33a032d2 /include/linux
parentffa2366666f06ce1df3296d106d90e0c2e0cd6b7 (diff)
usb: chipidea: Use extcon framework for VBUS and ID detect
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: Peter Chen <peter.chen@freescale.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb/chipidea.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
index a41833cd184c..c5cddc6901d0 100644
--- a/include/linux/usb/chipidea.h
+++ b/include/linux/usb/chipidea.h
@@ -5,9 +5,28 @@
5#ifndef __LINUX_USB_CHIPIDEA_H 5#ifndef __LINUX_USB_CHIPIDEA_H
6#define __LINUX_USB_CHIPIDEA_H 6#define __LINUX_USB_CHIPIDEA_H
7 7
8#include <linux/extcon.h>
8#include <linux/usb/otg.h> 9#include <linux/usb/otg.h>
9 10
10struct ci_hdrc; 11struct ci_hdrc;
12
13/**
14 * struct ci_hdrc_cable - structure for external connector cable state tracking
15 * @state: current state of the line
16 * @changed: set to true when extcon event happen
17 * @edev: device which generate events
18 * @ci: driver state of the chipidea device
19 * @nb: hold event notification callback
20 * @conn: used for notification registration
21 */
22struct ci_hdrc_cable {
23 bool state;
24 bool changed;
25 struct extcon_dev *edev;
26 struct ci_hdrc *ci;
27 struct notifier_block nb;
28};
29
11struct ci_hdrc_platform_data { 30struct ci_hdrc_platform_data {
12 const char *name; 31 const char *name;
13 /* offset of the capability registers */ 32 /* offset of the capability registers */
@@ -48,6 +67,10 @@ struct ci_hdrc_platform_data {
48 u32 ahb_burst_config; 67 u32 ahb_burst_config;
49 u32 tx_burst_size; 68 u32 tx_burst_size;
50 u32 rx_burst_size; 69 u32 rx_burst_size;
70
71 /* VBUS and ID signal state tracking, using extcon framework */
72 struct ci_hdrc_cable vbus_extcon;
73 struct ci_hdrc_cable id_extcon;
51}; 74};
52 75
53/* Default offset of capability registers */ 76/* Default offset of capability registers */