diff options
| author | Linus Walleij <linus.walleij@linaro.org> | 2018-02-12 03:53:12 -0500 |
|---|---|---|
| committer | Chanwoo Choi <cw00.choi@samsung.com> | 2018-03-21 00:58:08 -0400 |
| commit | 66afdedf269cf485efb5affb30c34e1f37705445 (patch) | |
| tree | 5928ec6d4e62a168c1d64c22068b3d931a2f2a08 /drivers/extcon/extcon-gpio.c | |
| parent | eca0f13c836a0d29fc2a713330698f08b743e86a (diff) | |
extcon: gpio: Localize platform data
Nothing in the entire kernel #includes <linux/extcon/extcon-gpio.h>
so move the platform data declaration inside of the driver.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon/extcon-gpio.c')
| -rw-r--r-- | drivers/extcon/extcon-gpio.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/extcon/extcon-gpio.c b/drivers/extcon/extcon-gpio.c index ab770adcca7e..5f88f36cc54e 100644 --- a/drivers/extcon/extcon-gpio.c +++ b/drivers/extcon/extcon-gpio.c | |||
| @@ -18,7 +18,6 @@ | |||
| 18 | */ | 18 | */ |
| 19 | 19 | ||
| 20 | #include <linux/extcon-provider.h> | 20 | #include <linux/extcon-provider.h> |
| 21 | #include <linux/extcon/extcon-gpio.h> | ||
| 22 | #include <linux/gpio.h> | 21 | #include <linux/gpio.h> |
| 23 | #include <linux/gpio/consumer.h> | 22 | #include <linux/gpio/consumer.h> |
| 24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
| @@ -29,6 +28,27 @@ | |||
| 29 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
| 30 | #include <linux/workqueue.h> | 29 | #include <linux/workqueue.h> |
| 31 | 30 | ||
| 31 | /** | ||
| 32 | * struct gpio_extcon_pdata - A simple GPIO-controlled extcon device. | ||
| 33 | * @extcon_id: The unique id of specific external connector. | ||
| 34 | * @gpio: Corresponding GPIO. | ||
| 35 | * @gpio_active_low: Boolean describing whether gpio active state is 1 or 0 | ||
| 36 | * If true, low state of gpio means active. | ||
| 37 | * If false, high state of gpio means active. | ||
| 38 | * @debounce: Debounce time for GPIO IRQ in ms. | ||
| 39 | * @irq_flags: IRQ Flags (e.g., IRQF_TRIGGER_LOW). | ||
| 40 | * @check_on_resume: Boolean describing whether to check the state of gpio | ||
| 41 | * while resuming from sleep. | ||
| 42 | */ | ||
| 43 | struct gpio_extcon_pdata { | ||
| 44 | unsigned int extcon_id; | ||
| 45 | unsigned gpio; | ||
| 46 | bool gpio_active_low; | ||
| 47 | unsigned long debounce; | ||
| 48 | unsigned long irq_flags; | ||
| 49 | bool check_on_resume; | ||
| 50 | }; | ||
| 51 | |||
| 32 | struct gpio_extcon_data { | 52 | struct gpio_extcon_data { |
| 33 | struct extcon_dev *edev; | 53 | struct extcon_dev *edev; |
| 34 | int irq; | 54 | int irq; |
