diff options
author | Chanwoo Choi <cw00.choi@samsung.com> | 2017-09-20 23:11:24 -0400 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2017-10-23 01:07:58 -0400 |
commit | 176aa36012135d172394a928a03fb03dfecd83f9 (patch) | |
tree | 77b630eb0c9c08a4c3aaedc1552f6b47e2bbaa62 /drivers/extcon | |
parent | 2bd6bf03f4c1c59381d62c61d03f6cc3fe71f66e (diff) |
extcon: Split out extcon header file for consumer and provider device
The extcon has two type of extcon devices as following.
- 'extcon provider deivce' adds new extcon device and detect the
state/properties of external connector. Also, it notifies the
state/properties to the extcon consumer device.
- 'extcon consumer device' gets the change state/properties
from extcon provider device.
Prior to that, include/linux/extcon.h contains all exported API for
both provider and consumer device driver. To clarify the meaning of
header file and to remove the wrong use-case on consumer device,
this patch separates into extcon.h and extcon-provider.h.
[Description for include/linux/{extcon.h|extcon-provider.h}]
- extcon.h includes the extcon API and data structure for extcon consumer
device driver. This header file contains the following APIs:
: Register/unregister the notifier to catch the change of extcon device
: Get the extcon device instance
: Get the extcon device name
: Get the state of each external connector
: Get the property value of each external connector
: Get the property capability of each external connector
- extcon-provider.h includes the extcon API and data structure for extcon
provider device driver. This header file contains the following APIs:
: Include 'include/linux/extcon.h'
: Allocate the memory for extcon device instance
: Register/unregister extcon device
: Set the state of each external connector
: Set the property value of each external connector
: Set the property capability of each external connector
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r-- | drivers/extcon/extcon-adc-jack.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-arizona.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-axp288.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-gpio.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-intel-cht-wc.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-intel-int3496.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-max14577.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-max3355.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-max77693.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-max77843.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-max8997.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-qcom-spmi-misc.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-rt8973a.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-sm5502.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-usb-gpio.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon-usbc-cros-ec.c | 2 | ||||
-rw-r--r-- | drivers/extcon/extcon.h | 2 |
17 files changed, 17 insertions, 17 deletions
diff --git a/drivers/extcon/extcon-adc-jack.c b/drivers/extcon/extcon-adc-jack.c index 6f6537ab0a79..3877d86c746a 100644 --- a/drivers/extcon/extcon-adc-jack.c +++ b/drivers/extcon/extcon-adc-jack.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/workqueue.h> | 26 | #include <linux/workqueue.h> |
27 | #include <linux/iio/consumer.h> | 27 | #include <linux/iio/consumer.h> |
28 | #include <linux/extcon/extcon-adc-jack.h> | 28 | #include <linux/extcon/extcon-adc-jack.h> |
29 | #include <linux/extcon.h> | 29 | #include <linux/extcon-provider.h> |
30 | 30 | ||
31 | /** | 31 | /** |
32 | * struct adc_jack_data - internal data for adc_jack device driver | 32 | * struct adc_jack_data - internal data for adc_jack device driver |
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c index f84da4a17724..da0e9bc4262f 100644 --- a/drivers/extcon/extcon-arizona.c +++ b/drivers/extcon/extcon-arizona.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/pm_runtime.h> | 27 | #include <linux/pm_runtime.h> |
28 | #include <linux/property.h> | 28 | #include <linux/property.h> |
29 | #include <linux/regulator/consumer.h> | 29 | #include <linux/regulator/consumer.h> |
30 | #include <linux/extcon.h> | 30 | #include <linux/extcon-provider.h> |
31 | 31 | ||
32 | #include <sound/soc.h> | 32 | #include <sound/soc.h> |
33 | 33 | ||
diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c index f4fd03e58e37..981fba56bc18 100644 --- a/drivers/extcon/extcon-axp288.c +++ b/drivers/extcon/extcon-axp288.c | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/property.h> | 23 | #include <linux/property.h> |
24 | #include <linux/notifier.h> | 24 | #include <linux/notifier.h> |
25 | #include <linux/extcon.h> | 25 | #include <linux/extcon-provider.h> |
26 | #include <linux/regmap.h> | 26 | #include <linux/regmap.h> |
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | #include <linux/gpio/consumer.h> | 28 | #include <linux/gpio/consumer.h> |
diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c index ebed22f22d75..ab770adcca7e 100644 --- a/drivers/extcon/extcon-gpio.c +++ b/drivers/extcon/extcon-gpio.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * GNU General Public License for more details. | 17 | * GNU General Public License for more details. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/extcon.h> | 20 | #include <linux/extcon-provider.h> |
21 | #include <linux/extcon/extcon-gpio.h> | 21 | #include <linux/extcon/extcon-gpio.h> |
22 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
23 | #include <linux/gpio/consumer.h> | 23 | #include <linux/gpio/consumer.h> |
diff --git a/drivers/extcon/extcon-intel-cht-wc.c b/drivers/extcon/extcon-intel-cht-wc.c index 91a0023074af..7c4bc8c44c3f 100644 --- a/drivers/extcon/extcon-intel-cht-wc.c +++ b/drivers/extcon/extcon-intel-cht-wc.c | |||
@@ -15,7 +15,7 @@ | |||
15 | * more details. | 15 | * more details. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/extcon.h> | 18 | #include <linux/extcon-provider.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/mfd/intel_soc_pmic.h> | 21 | #include <linux/mfd/intel_soc_pmic.h> |
diff --git a/drivers/extcon/extcon-intel-int3496.c b/drivers/extcon/extcon-intel-int3496.c index 1a45e745717d..c8691b5a9cb0 100644 --- a/drivers/extcon/extcon-intel-int3496.c +++ b/drivers/extcon/extcon-intel-int3496.c | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/acpi.h> | 21 | #include <linux/acpi.h> |
22 | #include <linux/extcon.h> | 22 | #include <linux/extcon-provider.h> |
23 | #include <linux/gpio.h> | 23 | #include <linux/gpio.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c index f6414b7fa5bc..6c2c9996eb71 100644 --- a/drivers/extcon/extcon-max14577.c +++ b/drivers/extcon/extcon-max14577.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/mfd/max14577.h> | 24 | #include <linux/mfd/max14577.h> |
25 | #include <linux/mfd/max14577-private.h> | 25 | #include <linux/mfd/max14577-private.h> |
26 | #include <linux/extcon.h> | 26 | #include <linux/extcon-provider.h> |
27 | 27 | ||
28 | #define DELAY_MS_DEFAULT 17000 /* unit: millisecond */ | 28 | #define DELAY_MS_DEFAULT 17000 /* unit: millisecond */ |
29 | 29 | ||
diff --git a/drivers/extcon/extcon-max3355.c b/drivers/extcon/extcon-max3355.c index 533e16a952b8..0aa410836f4e 100644 --- a/drivers/extcon/extcon-max3355.c +++ b/drivers/extcon/extcon-max3355.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * may be copied, distributed, and modified under those terms. | 9 | * may be copied, distributed, and modified under those terms. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/extcon.h> | 12 | #include <linux/extcon-provider.h> |
13 | #include <linux/gpio.h> | 13 | #include <linux/gpio.h> |
14 | #include <linux/gpio/consumer.h> | 14 | #include <linux/gpio/consumer.h> |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c index 7a5856809047..643411066ad9 100644 --- a/drivers/extcon/extcon-max77693.c +++ b/drivers/extcon/extcon-max77693.c | |||
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/mfd/max77693.h> | 26 | #include <linux/mfd/max77693.h> |
27 | #include <linux/mfd/max77693-common.h> | 27 | #include <linux/mfd/max77693-common.h> |
28 | #include <linux/mfd/max77693-private.h> | 28 | #include <linux/mfd/max77693-private.h> |
29 | #include <linux/extcon.h> | 29 | #include <linux/extcon-provider.h> |
30 | #include <linux/regmap.h> | 30 | #include <linux/regmap.h> |
31 | #include <linux/irqdomain.h> | 31 | #include <linux/irqdomain.h> |
32 | 32 | ||
diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c index 6e722d552cf1..28f251ff0fa2 100644 --- a/drivers/extcon/extcon-max77843.c +++ b/drivers/extcon/extcon-max77843.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * (at your option) any later version. | 11 | * (at your option) any later version. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/extcon.h> | 14 | #include <linux/extcon-provider.h> |
15 | #include <linux/i2c.h> | 15 | #include <linux/i2c.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c index 4a0612fb9c07..8152790d72e1 100644 --- a/drivers/extcon/extcon-max8997.c +++ b/drivers/extcon/extcon-max8997.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/kobject.h> | 25 | #include <linux/kobject.h> |
26 | #include <linux/mfd/max8997.h> | 26 | #include <linux/mfd/max8997.h> |
27 | #include <linux/mfd/max8997-private.h> | 27 | #include <linux/mfd/max8997-private.h> |
28 | #include <linux/extcon.h> | 28 | #include <linux/extcon-provider.h> |
29 | #include <linux/irqdomain.h> | 29 | #include <linux/irqdomain.h> |
30 | 30 | ||
31 | #define DEV_NAME "max8997-muic" | 31 | #define DEV_NAME "max8997-muic" |
diff --git a/drivers/extcon/extcon-qcom-spmi-misc.c b/drivers/extcon/extcon-qcom-spmi-misc.c index b8cde096a808..660bbf163bf5 100644 --- a/drivers/extcon/extcon-qcom-spmi-misc.c +++ b/drivers/extcon/extcon-qcom-spmi-misc.c | |||
@@ -15,7 +15,7 @@ | |||
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/extcon.h> | 18 | #include <linux/extcon-provider.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/interrupt.h> | 20 | #include <linux/interrupt.h> |
21 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
diff --git a/drivers/extcon/extcon-rt8973a.c b/drivers/extcon/extcon-rt8973a.c index eaa355e7d9e4..e059bd5f2041 100644 --- a/drivers/extcon/extcon-rt8973a.c +++ b/drivers/extcon/extcon-rt8973a.c | |||
@@ -20,7 +20,7 @@ | |||
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/regmap.h> | 21 | #include <linux/regmap.h> |
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <linux/extcon.h> | 23 | #include <linux/extcon-provider.h> |
24 | 24 | ||
25 | #include "extcon-rt8973a.h" | 25 | #include "extcon-rt8973a.h" |
26 | 26 | ||
diff --git a/drivers/extcon/extcon-sm5502.c b/drivers/extcon/extcon-sm5502.c index 106ef0297b53..0cfb5a3efdf6 100644 --- a/drivers/extcon/extcon-sm5502.c +++ b/drivers/extcon/extcon-sm5502.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/platform_device.h> | 19 | #include <linux/platform_device.h> |
20 | #include <linux/regmap.h> | 20 | #include <linux/regmap.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/extcon.h> | 22 | #include <linux/extcon-provider.h> |
23 | 23 | ||
24 | #include "extcon-sm5502.h" | 24 | #include "extcon-sm5502.h" |
25 | 25 | ||
diff --git a/drivers/extcon/extcon-usb-gpio.c b/drivers/extcon/extcon-usb-gpio.c index 9c925b05b7aa..53762864a9f7 100644 --- a/drivers/extcon/extcon-usb-gpio.c +++ b/drivers/extcon/extcon-usb-gpio.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/extcon.h> | 17 | #include <linux/extcon-provider.h> |
18 | #include <linux/gpio.h> | 18 | #include <linux/gpio.h> |
19 | #include <linux/gpio/consumer.h> | 19 | #include <linux/gpio/consumer.h> |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
diff --git a/drivers/extcon/extcon-usbc-cros-ec.c b/drivers/extcon/extcon-usbc-cros-ec.c index 598956f1dcae..6187f731b29d 100644 --- a/drivers/extcon/extcon-usbc-cros-ec.c +++ b/drivers/extcon/extcon-usbc-cros-ec.c | |||
@@ -14,7 +14,7 @@ | |||
14 | * GNU General Public License for more details. | 14 | * GNU General Public License for more details. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/extcon.h> | 17 | #include <linux/extcon-provider.h> |
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
19 | #include <linux/mfd/cros_ec.h> | 19 | #include <linux/mfd/cros_ec.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
diff --git a/drivers/extcon/extcon.h b/drivers/extcon/extcon.h index dddddcfa0587..cc1b436eb66a 100644 --- a/drivers/extcon/extcon.h +++ b/drivers/extcon/extcon.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __LINUX_EXTCON_INTERNAL_H__ | 1 | #ifndef __LINUX_EXTCON_INTERNAL_H__ |
2 | #define __LINUX_EXTCON_INTERNAL_H__ | 2 | #define __LINUX_EXTCON_INTERNAL_H__ |
3 | 3 | ||
4 | #include <linux/extcon.h> | 4 | #include <linux/extcon-provider.h> |
5 | 5 | ||
6 | /** | 6 | /** |
7 | * struct extcon_dev - An extcon device represents one external connector. | 7 | * struct extcon_dev - An extcon device represents one external connector. |