LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [patch 2.6.21-rc2] gpio_keys driver shouldn't be ARM-specific
@ 2007-03-01 23:51 David Brownell
2007-03-02 0:18 ` Ben Nizette
0 siblings, 1 reply; 4+ messages in thread
From: David Brownell @ 2007-03-01 23:51 UTC (permalink / raw)
To: Dmitry Torokhov, pHilipp Zabel
Cc: Andrew Morton, Haavard Skinnemoen, Linux Kernel list
The gpio_keys driver is wrongly ARM-specific; it can't build on
other platforms with GPIO suport. This fixes that problem.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
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(-)
Index: ap7000/drivers/input/keyboard/gpio_keys.c
===================================================================
--- ap7000.orig/drivers/input/keyboard/gpio_keys.c 2007-03-01 12:24:26.000000000 -0800
+++ ap7000/drivers/input/keyboard/gpio_keys.c 2007-03-01 12:25:54.000000000 -0800
@@ -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)
{
Index: ap7000/include/asm-arm/hardware/gpio_keys.h
===================================================================
--- ap7000.orig/include/asm-arm/hardware/gpio_keys.h 2007-03-01 11:49:06.000000000 -0800
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
@@ -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
Index: ap7000/include/linux/gpio_keys.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ ap7000/include/linux/gpio_keys.h 2007-03-01 12:24:58.000000000 -0800
@@ -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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 2.6.21-rc2] gpio_keys driver shouldn't be ARM-specific
2007-03-01 23:51 [patch 2.6.21-rc2] gpio_keys driver shouldn't be ARM-specific David Brownell
@ 2007-03-02 0:18 ` Ben Nizette
2007-03-02 0:54 ` David Brownell
0 siblings, 1 reply; 4+ messages in thread
From: Ben Nizette @ 2007-03-02 0:18 UTC (permalink / raw)
To: David Brownell
Cc: Dmitry Torokhov, pHilipp Zabel, Andrew Morton,
Haavard Skinnemoen, Linux Kernel list
David Brownell wrote:
> The gpio_keys driver 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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 2.6.21-rc2] gpio_keys driver shouldn't be ARM-specific
2007-03-02 0:18 ` Ben Nizette
@ 2007-03-02 0:54 ` David Brownell
2007-03-02 2:21 ` Ben Nizette
0 siblings, 1 reply; 4+ messages in thread
From: David Brownell @ 2007-03-02 0:54 UTC (permalink / raw)
To: Ben Nizette
Cc: Dmitry Torokhov, pHilipp Zabel, Andrew Morton,
Haavard Skinnemoen, Linux Kernel list
On Thursday 01 March 2007 4:18 pm, Ben Nizette wrote:
> David Brownell wrote:
> > The gpio_keys driver 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 ...
> 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?
Earlier today I posted a patch adding CONFIG_GENERIC_GPIO, and
I think that will get merged soonish ...
- Dave
>
> Ben.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 2.6.21-rc2] gpio_keys driver shouldn't be ARM-specific
2007-03-02 0:54 ` David Brownell
@ 2007-03-02 2:21 ` Ben Nizette
0 siblings, 0 replies; 4+ messages in thread
From: Ben Nizette @ 2007-03-02 2:21 UTC (permalink / raw)
To: David Brownell
Cc: Dmitry Torokhov, pHilipp Zabel, Andrew Morton,
Haavard Skinnemoen, Linux Kernel list
David Brownell wrote:
>> 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?
>
> 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.
> - Dave
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-03-02 2:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-01 23:51 [patch 2.6.21-rc2] gpio_keys driver shouldn't be ARM-specific David Brownell
2007-03-02 0:18 ` Ben Nizette
2007-03-02 0:54 ` David Brownell
2007-03-02 2:21 ` Ben Nizette
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).