Merge tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / include / linux / extcon / extcon-gpio.h
index 2d8307f..4195810 100644 (file)
 
 /**
  * struct gpio_extcon_platform_data - A simple GPIO-controlled extcon device.
- * @name       The name of this GPIO extcon device.
- * @gpio       Corresponding GPIO.
- * @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. If Null,
- *             default method of extcon class is used.
- * @state_off  print_state is overriden with state_on if detached. If Null,
- *             default method of extcon class is used.
+ * @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.
+ *                     If NULL, default method of extcon class is used.
+ * @state_off:         print_state is overriden with state_on if detached.
+ *                     If NUll, default method of extcon class is used.
  *
  * Note that in order for state_on or state_off to be valid, both state_on
  * and state_off should be not NULL. If at least one of them is NULL,
@@ -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;