summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-05 10:33:05 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-05 10:33:05 +0400
commitdafffd88e88493f4e8693a51b285a5d4c828fd6f (patch)
tree79a357c81404ae3471527b50120863022dc2b329 /include
parent00663d73e39a4aec0c310bb5fc1c2c8dfccf1319 (diff)
parent1a82e81e0ede6955684397ffbc0964191ef13cba (diff)
downloadlinux-dafffd88e88493f4e8693a51b285a5d4c828fd6f.tar.xz
Merge tag 'extcon-next-for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next
Chanwoo writes: Update extcon for 3.12 This patchset add new file for OF helper API and modify small fix of extcon-palmas driver. Also, extcon core dirver use power_efficient_wq instead of system_wq. Detailed description for patchset: 1. Add new file for OF helper API - Add OF(OpenFirmware) Helper API which is of_extcon_get_extcon_device(). This helper API get the extcon device name on extcon consumer device. - Add usase case about OF helper API of extcon in dwc3-omap.c. dwc3-omap driver use extcon subsystem to detect the state of USB/USB-Host cable so dwc3-omap call of_extcon_get_extcon_device() to need extcon device name. 2. Modify extcon-palmas.c driver - Provide option to select whether interrupt is used or not - Support suspend/resume for palmas driver - Update palmas interrupt register to detect ID pin - Code clean to remove unused data - Rename filename for device tree binding (extcon-twl.txt -> extcon-palmas.txt) 3. Use power_effcient_wq on extcon core driver/extcon-arizona instead of system_wq - extcon core driver(extcon-gpio.c/extcon-adc-jack.c) use power_effcient_wq instead of system_wq.
Diffstat (limited to 'include')
-rw-r--r--include/linux/extcon/of_extcon.h31
-rw-r--r--include/linux/mfd/palmas.h8
-rw-r--r--include/linux/usb/dwc3-omap.h30
3 files changed, 34 insertions, 35 deletions
diff --git a/include/linux/extcon/of_extcon.h b/include/linux/extcon/of_extcon.h
new file mode 100644
index 000000000000..0ebfeff1b55d
--- /dev/null
+++ b/include/linux/extcon/of_extcon.h
@@ -0,0 +1,31 @@
+/*
+ * OF helpers for External connector (extcon) framework
+ *
+ * Copyright (C) 2013 Texas Instruments, Inc.
+ * Kishon Vijay Abraham I <kishon@ti.com>
+ *
+ * Copyright (C) 2013 Samsung Electronics
+ * Chanwoo Choi <cw00.choi@samsung.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#ifndef __LINUX_OF_EXTCON_H
+#define __LINUX_OF_EXTCON_H
+
+#include <linux/err.h>
+
+#if IS_ENABLED(CONFIG_OF_EXTCON)
+extern struct extcon_dev
+ *of_extcon_get_extcon_dev(struct device *dev, int index);
+#else
+static inline struct extcon_dev
+ *of_extcon_get_extcon_dev(struct device *dev, int index)
+{
+ return ERR_PTR(-ENOSYS);
+}
+#endif /* CONFIG_OF_EXTCON */
+#endif /* __LINUX_OF_EXTCON_H */
diff --git a/include/linux/mfd/palmas.h b/include/linux/mfd/palmas.h
index 1a8dd7afe084..cfc678ceb570 100644
--- a/include/linux/mfd/palmas.h
+++ b/include/linux/mfd/palmas.h
@@ -371,17 +371,15 @@ struct palmas_usb {
struct extcon_dev edev;
- /* used to set vbus, in atomic path */
- struct work_struct set_vbus_work;
-
int id_otg_irq;
int id_irq;
int vbus_otg_irq;
int vbus_irq;
- int vbus_enable;
-
enum palmas_usb_state linkstat;
+ int wakeup;
+ bool enable_vbus_detection;
+ bool enable_id_detection;
};
#define comparator_to_palmas(x) container_of((x), struct palmas_usb, comparator)
diff --git a/include/linux/usb/dwc3-omap.h b/include/linux/usb/dwc3-omap.h
deleted file mode 100644
index 5615f4d82724..000000000000
--- a/include/linux/usb/dwc3-omap.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2013 by Texas Instruments
- *
- * The Inventra Controller Driver for Linux is free software; you
- * can redistribute it and/or modify it under the terms of the GNU
- * General Public License version 2 as published by the Free Software
- * Foundation.
- */
-
-#ifndef __DWC3_OMAP_H__
-#define __DWC3_OMAP_H__
-
-enum omap_dwc3_vbus_id_status {
- OMAP_DWC3_UNKNOWN = 0,
- OMAP_DWC3_ID_GROUND,
- OMAP_DWC3_ID_FLOAT,
- OMAP_DWC3_VBUS_VALID,
- OMAP_DWC3_VBUS_OFF,
-};
-
-#if (defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_DWC3_MODULE))
-extern int dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status);
-#else
-static inline int dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status)
-{
- return -ENODEV;
-}
-#endif
-
-#endif /* __DWC3_OMAP_H__ */