summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/ci.h
diff options
context:
space:
mode:
authorSanchayan Maity <maitysanchayan@gmail.com>2016-09-15 18:45:44 +0530
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-01-10 23:10:09 +0100
commit1f43d373946ee34ce0cfeb667a9aa48d6995bfea (patch)
treec80101304183ff0f9b08297bfe5413a0bdb01e85 /drivers/usb/chipidea/ci.h
parent59d1e5b7dfb43223ec9c7f0214dee1a2c9e9bcad (diff)
usb: chipidea: Use extcon framework for ID and VBUS detection
Rather than relying on special USB/PHY pins/registers use the generic extcon framework with its extcon-usb-gpio implementation to detect ID and VBUS changes. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com> Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit be04dc33f409996c37d8c69702748890b4968c67)
Diffstat (limited to 'drivers/usb/chipidea/ci.h')
-rw-r--r--drivers/usb/chipidea/ci.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h
index 207e4a34be07..7aeb92288643 100644
--- a/drivers/usb/chipidea/ci.h
+++ b/drivers/usb/chipidea/ci.h
@@ -18,6 +18,7 @@
#include <linux/usb.h>
#include <linux/usb/gadget.h>
#include <linux/usb/otg-fsm.h>
+#include <linux/extcon.h>
/******************************************************************************
* DEFINE
@@ -256,6 +257,12 @@ struct ci_hdrc {
bool in_lpm;
bool wakeup_int;
enum ci_revision rev;
+
+ struct extcon_specific_cable_nb extcon_vbus_dev;
+ struct extcon_specific_cable_nb extcon_id_dev;
+ struct notifier_block vbus_nb;
+ struct notifier_block id_nb;
+
/* register save area for suspend&resume */
u32 pm_command;
u32 pm_status;