aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/s3c24xx/patches/0098-Fix-the-FIXME-store-the-GPIO-value-for-now.patch
diff options
context:
space:
mode:
authorMirko Vogt <mirko@openwrt.org>2008-12-12 00:02:36 +0000
committerMirko Vogt <mirko@openwrt.org>2008-12-12 00:02:36 +0000
commitb9dfb81f2aa45be745a8aed9684076210aed4152 (patch)
treeaceadd7f37096911a29c929988cbcf7c964a1c0b /target/linux/s3c24xx/patches/0098-Fix-the-FIXME-store-the-GPIO-value-for-now.patch
parent4571721ec22de116ad9998657e0a3c12da6405fb (diff)
downloadupstream-b9dfb81f2aa45be745a8aed9684076210aed4152.tar.gz
upstream-b9dfb81f2aa45be745a8aed9684076210aed4152.tar.bz2
upstream-b9dfb81f2aa45be745a8aed9684076210aed4152.zip
add support for target 3c24xx (more known as Openmoko GTA02 "Freerunner") and merge it with the openmoko-target and the work Michael Buesch <mb> did
SVN-Revision: 13609
Diffstat (limited to 'target/linux/s3c24xx/patches/0098-Fix-the-FIXME-store-the-GPIO-value-for-now.patch')
-rwxr-xr-xtarget/linux/s3c24xx/patches/0098-Fix-the-FIXME-store-the-GPIO-value-for-now.patch85
1 files changed, 85 insertions, 0 deletions
diff --git a/target/linux/s3c24xx/patches/0098-Fix-the-FIXME-store-the-GPIO-value-for-now.patch b/target/linux/s3c24xx/patches/0098-Fix-the-FIXME-store-the-GPIO-value-for-now.patch
new file mode 100755
index 0000000000..85c0dc40c0
--- /dev/null
+++ b/target/linux/s3c24xx/patches/0098-Fix-the-FIXME-store-the-GPIO-value-for-now.patch
@@ -0,0 +1,85 @@
+From 4b1af3131a97c004c8cdc74b61fbdd00d3ab22e4 Mon Sep 17 00:00:00 2001
+From: Holger Freyther <zecke@openmoko.org>
+Date: Fri, 25 Jul 2008 23:06:03 +0100
+Subject: [PATCH] Fix the FIXME, store the GPIO value for now
+
+Signed-Off-by: Holger Freyther <zecke@openmoko.org>
+---
+ drivers/input/keyboard/neo1973kbd.c | 23 +++++++++++++----------
+ 1 files changed, 13 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/input/keyboard/neo1973kbd.c b/drivers/input/keyboard/neo1973kbd.c
+index 30f324d..a77d8c0 100644
+--- a/drivers/input/keyboard/neo1973kbd.c
++++ b/drivers/input/keyboard/neo1973kbd.c
+@@ -23,20 +23,21 @@
+ #include <linux/slab.h>
+
+ #include <asm/hardware.h>
+-#include <asm/arch/gta01.h>
+ #include <asm/mach-types.h>
+
+ struct neo1973kbd {
+ struct input_dev *input;
+ unsigned int suspended;
++ int gpio_aux;
++ int gpio_hold;
++ int gpio_jack;
+ };
+
+ static irqreturn_t neo1973kbd_aux_irq(int irq, void *dev_id)
+ {
+ struct neo1973kbd *neo1973kbd_data = dev_id;
+
+- /* FIXME: use GPIO from platform_dev resources */
+- int key_pressed = !s3c2410_gpio_getpin(GTA01_GPIO_AUX_KEY);
++ int key_pressed = !s3c2410_gpio_getpin(neo1973kbd_data->gpio_aux);
+ input_report_key(neo1973kbd_data->input, KEY_PHONE, key_pressed);
+ input_sync(neo1973kbd_data->input);
+
+@@ -47,8 +48,7 @@ static irqreturn_t neo1973kbd_hold_irq(int irq, void *dev_id)
+ {
+ struct neo1973kbd *neo1973kbd_data = dev_id;
+
+- /* FIXME: use GPIO from platform_dev resources */
+- int key_pressed = 3c2410_gpio_getpin(GTA01_GPIO_HOLD_KEY);
++ int key_pressed = s3c2410_gpio_getpin(neo1973kbd_data->gpio_hold);
+ input_report_key(neo1973kbd_data->input, KEY_PAUSE, key_pressed);
+ input_sync(neo1973kbd_data->input);
+
+@@ -59,8 +59,7 @@ static irqreturn_t neo1973kbd_headphone_irq(int irq, void *dev_id)
+ {
+ struct neo1973kbd *neo1973kbd_data = dev_id;
+
+- /* FIXME: use GPIO from platform_dev resources */
+- int key_pressed = s3c2410_gpio_getpin(GTA01_GPIO_JACK_INSERT);
++ int key_pressed = s3c2410_gpio_getpin(neo1973kbd_data->gpio_jack);
+ input_report_switch(neo1973kbd_data->input,
+ SW_HEADPHONE_INSERT, key_pressed);
+ input_sync(neo1973kbd_data->input);
+@@ -108,15 +107,19 @@ static int neo1973kbd_probe(struct platform_device *pdev)
+ if (pdev->resource[0].flags != 0)
+ return -EINVAL;
+
+- irq_aux = s3c2410_gpio_getirq(pdev->resource[0].start);
++ neo1973kbd->gpio_aux = pdev->resource[0].start;
++ neo1973kbd->gpio_hold = pdev->resource[1].start;
++ neo1973kbd->gpio_jack = pdev->resource[2].start;
++
++ irq_aux = s3c2410_gpio_getirq(neo1973kbd->gpio_aux);
+ if (irq_aux < 0)
+ return -EINVAL;
+
+- irq_hold = s3c2410_gpio_getirq(pdev->resource[1].start);
++ irq_hold = s3c2410_gpio_getirq(neo1973kbd->gpio_hold);
+ if (irq_hold < 0)
+ return -EINVAL;
+
+- irq_jack = s3c2410_gpio_getirq(pdev->resource[2].start);
++ irq_jack = s3c2410_gpio_getirq(neo1973kbd->gpio_jack);
+ if (irq_jack < 0)
+ return -EINVAL;
+
+--
+1.5.6.3
+