diff options
author | Guenter Roeck <linux@roeck-us.net> | 2013-09-12 08:49:54 +0900 |
---|---|---|
committer | Chanwoo Choi <cw00.choi@samsung.com> | 2013-09-27 09:37:01 +0900 |
commit | 5bfbdc9caa7e16b2a77a62a9f9a63b5693e23716 (patch) | |
tree | c2c38080043b0ae1fba1fe462d691436ba25d9fc /include/linux/extcon | |
parent | 7c0f6558f893eb5eddb52ee0fa84c2d43b2c199a (diff) | |
download | lwn-5bfbdc9caa7e16b2a77a62a9f9a63b5693e23716.tar.gz lwn-5bfbdc9caa7e16b2a77a62a9f9a63b5693e23716.zip |
extcon: gpio: Add support for active-low presence to detect pins
This patch add 'gpio_active_low' field to 'struct gpio_extcon_data'
to check whether gpio active state is 1(high) or 0(low).
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'include/linux/extcon')
-rw-r--r-- | include/linux/extcon/extcon-gpio.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/extcon/extcon-gpio.h b/include/linux/extcon/extcon-gpio.h index 4ce1aa7d29bd..4195810f87fe 100644 --- a/include/linux/extcon/extcon-gpio.h +++ b/include/linux/extcon/extcon-gpio.h @@ -27,6 +27,9 @@ * struct gpio_extcon_platform_data - A simple GPIO-controlled extcon device. * @name: The name of this GPIO extcon device. * @gpio: Corresponding GPIO. + * @gpio_active_low: Boolean describing whether gpio active state is 1 or 0 + * If true, low state of gpio means active. + * If false, high state of gpio means active. * @debounce: Debounce time for GPIO IRQ in ms. * @irq_flags: IRQ Flags (e.g., IRQF_TRIGGER_LOW). * @state_on: print_state is overriden with state_on if attached. @@ -41,6 +44,7 @@ struct gpio_extcon_platform_data { const char *name; unsigned gpio; + bool gpio_active_low; unsigned long debounce; unsigned long irq_flags; |