summaryrefslogtreecommitdiff
path: root/include/linux/gpio_keys.h
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@intel.com>2014-10-21 23:30:25 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-11-04 21:58:23 +0100
commit633a21d80b4a2cd648aa2dacdb22494ffb2f28f0 (patch)
tree0e2dfc45b7ce0b9ed7401bc886417d447a7a08fd /include/linux/gpio_keys.h
parent5c51277a9ababfa44a7f944100bdc9fbda139905 (diff)
input: gpio_keys_polled: Add support for GPIO descriptors
GPIO descriptors are the preferred way over legacy GPIO numbers nowadays. Convert the driver to use GPIO descriptors internally but still allow passing legacy GPIO numbers from platform data to support existing platforms. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Grant Likely <grant.likely@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/gpio_keys.h')
-rw-r--r--include/linux/gpio_keys.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h
index 8b622468952c..ee2d8c6f9130 100644
--- a/include/linux/gpio_keys.h
+++ b/include/linux/gpio_keys.h
@@ -2,6 +2,7 @@
#define _GPIO_KEYS_H
struct device;
+struct gpio_desc;
/**
* struct gpio_keys_button - configuration parameters
@@ -17,6 +18,7 @@ struct device;
* disable button via sysfs
* @value: axis value for %EV_ABS
* @irq: Irq number in case of interrupt keys
+ * @gpiod: GPIO descriptor
*/
struct gpio_keys_button {
unsigned int code;
@@ -29,6 +31,7 @@ struct gpio_keys_button {
bool can_disable;
int value;
unsigned int irq;
+ struct gpio_desc *gpiod;
};
/**