mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
5c51277a9a
commit
633a21d80b
@@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user