gpio_keys driver shouldn't be ARM-specific
PATCH 1/1 gpio_keys driver shouldn't be ARM-specific
The gpio_keys driver is wrongly ARM-specific; it can't build on other platforms with GPIO suport. This fixes that problem.
---
MERGE NOTE: this just moves gpio_keys.h; this patch does no GIT magic
include/asm-arm/hardware/gpio_keys.h | 17 ----------------- drivers/input/keyboard/gpio_keys.c | 4 +--- include/linux/gpio_keys.h | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 20 deletions(-)
drivers/input/keyboard/gpio_keys.c +1 -3
@@ -23,11 +23,9 @@#include <linux/platform_device.h> #include <linux/input.h> #include <linux/irq.h> +#include <linux/gpio_keys.h> #include <asm/gpio.h> -#include <asm/arch/hardware.h> - -#include <asm/hardware/gpio_keys.h> static irqreturn_t gpio_keys_isr (int irq,void *dev_id) {
include/asm-arm/hardware/gpio_keys.h deleted +0 -17
@@ -1,17 +0,0 @@ -#ifndef _GPIO_KEYS_H -#define _GPIO_KEYS_H - -struct gpio_keys_button { -/* Configuration parameters */ -int keycode; -int gpio; -int active_low; -char *desc; -}; - -struct gpio_keys_platform_data { -struct gpio_keys_button *buttons; -int nbuttons; -}; - -#endif
include/linux/gpio_keys.h new file +17 -0
@@ -0,0 +1,17 @@ +#ifndef _GPIO_KEYS_H +#define _GPIO_KEYS_H + +struct gpio_keys_button { +/* Configuration parameters */ +int keycode; +int gpio; +int active_low; +char *desc; +}; + +struct gpio_keys_platform_data { +struct gpio_keys_button *buttons; +int nbuttons; +}; + +#endif
Quoted 3 lines · David Brownell
The
gpio_keysdriver is wrongly ARM-specific; it can't build on other platforms with GPIO suport. This fixes that problem.
I did up a similar patch a few days back, you beat me too it ;). I've been using this driver on AVR32 for a while now.
The other thing was that this driver only depends on the machine supporting your generic GPIO conventions. Currently the Kconfig entry for gpio_keys reads:
depends on (ARCH_SA1100 || ARCH_PXA || ARCH_S3C2410)
With the || AVR32 I've added to my version it's getting a bit out of hand! Anyone else think it would be worth introducing a GPIO_FRAMEWORK symbol selected by each machine which supports it and just set the gpio_keys dependency to that?
Ben.
Quoted 6 lines · Ben Nizette
Quoted 3 lines · David Brownell
The
gpio_keysdriver is wrongly ARM-specific; it can't build on other platforms with GPIO suport. This fixes that problem.I did up a similar patch a few days back, you beat me too it ;). I've been using this driver on AVR32 for a while now.
I know various folk have been doing that very thing ...
Quoted 10 lines
The other thing was that this driver only depends on the machine supporting your generic GPIO conventions. Currently the
Kconfigentry forgpio_keysreads:depends on (ARCH_SA1100 || ARCH_PXA || ARCH_S3C2410)With the || AVR32 I've added to my version it's getting a bit out of hand! Anyone else think it would be worth introducing a
GPIO_FRAMEWORKsymbol selected by each machine which supports it and just set thegpio_keysdependency to that?
Earlier today I posted a patch adding CONFIG_GENERIC_GPIO, and I think that will get merged soonish ...
- Dave
Quoted 3 lines
Ben.
Quoted 5 lines · David Brownell
Quoted 1 line
With the || AVR32 I've added to my version it's getting a bit out of hand! Anyone else think it would be worth introducing a
GPIO_FRAMEWORKsymbol selected by each machine which supports it and just set thegpio_keysdependency to that?Earlier today I posted a patch adding
CONFIG_GENERIC_GPIO, and I think that will get merged soonish ...
Beat me to it again. Cheers,
--Ben.
Quoted 2 lines
- Dave