summaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon.c
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2016-06-27 12:17:06 +0200
committerChanwoo Choi <cw00.choi@samsung.com>2016-06-27 13:31:21 +0200
commit20f7b53dfc24e0caa984087691af82e442229680 (patch)
tree113d034a20f20e77fca369dc68e0042529debf2a /drivers/extcon/extcon.c
parentextcon: Check for incorrect connection type in notifier register (diff)
downloadlinux-20f7b53dfc24e0caa984087691af82e442229680.tar.xz
linux-20f7b53dfc24e0caa984087691af82e442229680.zip
extcon: Move struct extcon_cable from header file to core
This patch moves the struct extcon_cable because that should be only handled by extcon core. There are no reason to publish the internal structure. Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon/extcon.c')
-rw-r--r--drivers/extcon/extcon.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index b6408f015637..b5fdb5d9dbad 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -77,6 +77,26 @@ static const char *extcon_name[] = {
NULL,
};
+/**
+ * struct extcon_cable - An internal data for each cable of extcon device.
+ * @edev: The extcon device
+ * @cable_index: Index of this cable in the edev
+ * @attr_g: Attribute group for the cable
+ * @attr_name: "name" sysfs entry
+ * @attr_state: "state" sysfs entry
+ * @attrs: Array pointing to attr_name and attr_state for attr_g
+ */
+struct extcon_cable {
+ struct extcon_dev *edev;
+ int cable_index;
+
+ struct attribute_group attr_g;
+ struct device_attribute attr_name;
+ struct device_attribute attr_state;
+
+ struct attribute *attrs[3]; /* to be fed to attr_g.attrs */
+};
+
static struct class *extcon_class;
#if defined(CONFIG_ANDROID)
static struct class_compat *switch_class;