aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStephen Boyd <stephen.boyd@linaro.org>2016-12-28 17:56:51 -0500
committerPeter Chen <peter.chen@nxp.com>2017-01-19 22:24:35 -0500
commita89b94b53371bbfa582787c2fa3378000ea4263d (patch)
treecf2d6069db48ae6ec933f75b21c1addc2b7881dd /include
parentf60f8ccd54e03c1afafb2b20ceb029a0eaf7a134 (diff)
usb: chipidea: Handle extcon events properly
We're currently emulating the vbus and id interrupts in the OTGSC read API, but we also need to make sure that if we're handling the events with extcon that we don't enable the interrupts for those events in the hardware. Therefore, properly emulate this register if we're using extcon, but don't enable the interrupts. This allows me to get my cable connect/disconnect working properly without getting spurious interrupts on my device that uses an extcon for these two events. Acked-by: Peter Chen <peter.chen@nxp.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "Ivan T. Ivanov" <iivanov.xz@gmail.com> Fixes: 3ecb3e09b042 ("usb: chipidea: Use extcon framework for VBUS and ID detect") Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org> Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/chipidea.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
index 5dd75fa47dd8..f9be467d6695 100644
--- a/include/linux/usb/chipidea.h
+++ b/include/linux/usb/chipidea.h
@@ -14,6 +14,7 @@ struct ci_hdrc;
14 * struct ci_hdrc_cable - structure for external connector cable state tracking 14 * struct ci_hdrc_cable - structure for external connector cable state tracking
15 * @state: current state of the line 15 * @state: current state of the line
16 * @changed: set to true when extcon event happen 16 * @changed: set to true when extcon event happen
17 * @enabled: set to true if we've enabled the vbus or id interrupt
17 * @edev: device which generate events 18 * @edev: device which generate events
18 * @ci: driver state of the chipidea device 19 * @ci: driver state of the chipidea device
19 * @nb: hold event notification callback 20 * @nb: hold event notification callback
@@ -22,6 +23,7 @@ struct ci_hdrc;
22struct ci_hdrc_cable { 23struct ci_hdrc_cable {
23 bool state; 24 bool state;
24 bool changed; 25 bool changed;
26 bool enabled;
25 struct extcon_dev *edev; 27 struct extcon_dev *edev;
26 struct ci_hdrc *ci; 28 struct ci_hdrc *ci;
27 struct notifier_block nb; 29 struct notifier_block nb;