[ar71xx] preliminary support for the Ubiquiti RouterStation Pro
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1109-Convert-the-driver-to-the-generic-GPIO-framework.patch
1 From 382b211cbde80703444333900dbdc0cf63d3ffab Mon Sep 17 00:00:00 2001
2 From: Holger Freyther <zecke@openmoko.org>
3 Date: Sun, 13 Apr 2008 07:25:54 +0100
4 Subject: [PATCH] Convert the driver to the generic GPIO framework
5
6 Signed-Off-by: Holger Freyther <zecke@openmoko.org>
7 ---
8 drivers/input/keyboard/neo1973kbd.c | 20 ++++++++++----------
9 1 files changed, 10 insertions(+), 10 deletions(-)
10
11 diff --git a/drivers/input/keyboard/neo1973kbd.c b/drivers/input/keyboard/neo1973kbd.c
12 index a77d8c0..b413bc8 100644
13 --- a/drivers/input/keyboard/neo1973kbd.c
14 +++ b/drivers/input/keyboard/neo1973kbd.c
15 @@ -22,7 +22,7 @@
16 #include <linux/module.h>
17 #include <linux/slab.h>
18
19 -#include <asm/hardware.h>
20 +#include <asm/gpio.h>
21 #include <asm/mach-types.h>
22
23 struct neo1973kbd {
24 @@ -37,7 +37,7 @@ static irqreturn_t neo1973kbd_aux_irq(int irq, void *dev_id)
25 {
26 struct neo1973kbd *neo1973kbd_data = dev_id;
27
28 - int key_pressed = !s3c2410_gpio_getpin(neo1973kbd_data->gpio_aux);
29 + int key_pressed = !gpio_get_value(neo1973kbd_data->gpio_aux);
30 input_report_key(neo1973kbd_data->input, KEY_PHONE, key_pressed);
31 input_sync(neo1973kbd_data->input);
32
33 @@ -48,7 +48,7 @@ static irqreturn_t neo1973kbd_hold_irq(int irq, void *dev_id)
34 {
35 struct neo1973kbd *neo1973kbd_data = dev_id;
36
37 - int key_pressed = s3c2410_gpio_getpin(neo1973kbd_data->gpio_hold);
38 + int key_pressed = gpio_get_value(neo1973kbd_data->gpio_hold);
39 input_report_key(neo1973kbd_data->input, KEY_PAUSE, key_pressed);
40 input_sync(neo1973kbd_data->input);
41
42 @@ -59,7 +59,7 @@ static irqreturn_t neo1973kbd_headphone_irq(int irq, void *dev_id)
43 {
44 struct neo1973kbd *neo1973kbd_data = dev_id;
45
46 - int key_pressed = s3c2410_gpio_getpin(neo1973kbd_data->gpio_jack);
47 + int key_pressed = gpio_get_value(neo1973kbd_data->gpio_jack);
48 input_report_switch(neo1973kbd_data->input,
49 SW_HEADPHONE_INSERT, key_pressed);
50 input_sync(neo1973kbd_data->input);
51 @@ -111,15 +111,15 @@ static int neo1973kbd_probe(struct platform_device *pdev)
52 neo1973kbd->gpio_hold = pdev->resource[1].start;
53 neo1973kbd->gpio_jack = pdev->resource[2].start;
54
55 - irq_aux = s3c2410_gpio_getirq(neo1973kbd->gpio_aux);
56 + irq_aux = gpio_to_irq(neo1973kbd->gpio_aux);
57 if (irq_aux < 0)
58 return -EINVAL;
59
60 - irq_hold = s3c2410_gpio_getirq(neo1973kbd->gpio_hold);
61 + irq_hold = gpio_to_irq(neo1973kbd->gpio_hold);
62 if (irq_hold < 0)
63 return -EINVAL;
64
65 - irq_jack = s3c2410_gpio_getirq(neo1973kbd->gpio_jack);
66 + irq_jack = gpio_to_irq(neo1973kbd->gpio_jack);
67 if (irq_jack < 0)
68 return -EINVAL;
69
70 @@ -194,9 +194,9 @@ static int neo1973kbd_remove(struct platform_device *pdev)
71 {
72 struct neo1973kbd *neo1973kbd = platform_get_drvdata(pdev);
73
74 - free_irq(s3c2410_gpio_getirq(pdev->resource[2].start), neo1973kbd);
75 - free_irq(s3c2410_gpio_getirq(pdev->resource[1].start), neo1973kbd);
76 - free_irq(s3c2410_gpio_getirq(pdev->resource[0].start), neo1973kbd);
77 + free_irq(gpio_to_irq(pdev->resource[2].start), neo1973kbd);
78 + free_irq(gpio_to_irq(pdev->resource[1].start), neo1973kbd);
79 + free_irq(gpio_to_irq(pdev->resource[0].start), neo1973kbd);
80
81 input_unregister_device(neo1973kbd->input);
82 input_free_device(neo1973kbd->input);
83 --
84 1.5.6.5
85
This page took 0.050472 seconds and 5 git commands to generate.