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>
This commit is contained in:
Guenter Roeck 2013-09-12 08:49:54 +09:00 committed by Chanwoo Choi
parent 7c0f6558f8
commit 5bfbdc9caa
2 changed files with 8 additions and 0 deletions

View file

@ -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;