summaryrefslogtreecommitdiff
path: root/include/linux/mfd/palmas.h
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2015-08-03 17:40:51 +0300
committerChanwoo Choi <cw00.choi@samsung.com>2015-08-10 21:26:25 +0900
commit92b7cb5dc885b38b21093eefed8028b615952965 (patch)
treede56922baf3fee8dd9ec7c7f9a43599de61c07f0 /include/linux/mfd/palmas.h
parenta598af7f0279195abffbfb9bf2070457e9c89ff3 (diff)
extcon: palmas: Support GPIO based USB ID detection
Some palmas based chip variants do not have OTG based ID logic. For these variants we rely on GPIO based USB ID detection. These chips do have VBUS comparator for VBUS detection so we continue to use the old way of detecting VBUS. Signed-off-by: Roger Quadros <rogerq@ti.com> Acked-by: Chanwoo Choi <cw00.choi@samsung.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'include/linux/mfd/palmas.h')
-rw-r--r--include/linux/mfd/palmas.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index bb270bd03eed..13e1d96935ed 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -21,6 +21,7 @@
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/extcon.h>
+#include <linux/of_gpio.h>
#include <linux/usb/phy_companion.h>
#define PALMAS_NUM_CLIENTS 3
@@ -551,10 +552,16 @@ struct palmas_usb {
int vbus_otg_irq;
int vbus_irq;
+ int gpio_id_irq;
+ struct gpio_desc *id_gpiod;
+ unsigned long sw_debounce_jiffies;
+ struct delayed_work wq_detectid;
+
enum palmas_usb_state linkstat;
int wakeup;
bool enable_vbus_detection;
bool enable_id_detection;
+ bool enable_gpio_id_detection;
};
#define comparator_to_palmas(x) container_of((x), struct palmas_usb, comparator)