diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 06:48:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-29 06:48:03 -0500 |
commit | 21af0297c7e56024a5ccc4d8ad2a590f9ec371ba (patch) | |
tree | 5d288c1877b1ae9fbe24aa7fabd79565e73d3d2f /arch/mips/au1000/mtx-1/platform.c | |
parent | 5ea293a9048d3a58cb0c840fa719d85ad14cba47 (diff) | |
parent | a9d2517c7a5c8028fbc5296d3af3c75597d3d180 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (68 commits)
[MIPS] remove Documentation/mips/GT64120.README
[MIPS] Malta: remaining bits of the board support code cleanup
[MIPS] Malta: make the helper function static
[MIPS] Malta: fix braces at single statement blocks
[MIPS] Malta, Atlas: move an extern function declaration to the header file
[MIPS] Malta: Use C89 style for comments
[MIPS] Malta: else should follow close brace in malta_int.c
[MIPS] Malta: remove a superfluous comment
[MIPS] Malta: include <linux/cpu.h> instead of <asm/cpu.h>
[MIPS] Malta, Atlas, Sead: remove an extern from .c files
[MIPS] Malta: fix oversized lines in malta_int.c
[MIPS] Malta: remove a dead function declaration
[MIPS] Malta: use tabs not spaces
[MIPS] Malta: set up the screen info in a separate function
[MIPS] Malta: check the PCI clock frequency in a separate function
[MIPS] Malta: use the KERN_ facility level in printk()
[MIPS] Malta: use Linux kernel style for structure initialization
[MIPS]: constify function pointer tables
[MIPS] compat: handle argument endianess of sys32_(f)truncate64 with merge_64
[MIPS] Cobalt 64-bits kernels can be safely unmarked experimental
...
Diffstat (limited to 'arch/mips/au1000/mtx-1/platform.c')
-rw-r--r-- | arch/mips/au1000/mtx-1/platform.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/arch/mips/au1000/mtx-1/platform.c b/arch/mips/au1000/mtx-1/platform.c index 49c0fb409fea..ce8637b3afa9 100644 --- a/arch/mips/au1000/mtx-1/platform.c +++ b/arch/mips/au1000/mtx-1/platform.c | |||
@@ -22,9 +22,32 @@ | |||
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/leds.h> | 24 | #include <linux/leds.h> |
25 | #include <linux/gpio_keys.h> | ||
26 | #include <linux/input.h> | ||
25 | 27 | ||
26 | #include <asm/gpio.h> | 28 | #include <asm/gpio.h> |
27 | 29 | ||
30 | static struct gpio_keys_button mtx1_gpio_button[] = { | ||
31 | { | ||
32 | .gpio = 207, | ||
33 | .code = BTN_0, | ||
34 | .desc = "System button", | ||
35 | } | ||
36 | }; | ||
37 | |||
38 | static struct gpio_keys_platform_data mtx1_buttons_data = { | ||
39 | .buttons = mtx1_gpio_button, | ||
40 | .nbuttons = ARRAY_SIZE(mtx1_gpio_button), | ||
41 | }; | ||
42 | |||
43 | static struct platform_device mtx1_button = { | ||
44 | .name = "gpio-keys", | ||
45 | .id = -1, | ||
46 | .dev = { | ||
47 | .platform_data = &mtx1_buttons_data, | ||
48 | } | ||
49 | }; | ||
50 | |||
28 | static struct resource mtx1_wdt_res[] = { | 51 | static struct resource mtx1_wdt_res[] = { |
29 | [0] = { | 52 | [0] = { |
30 | .start = 15, | 53 | .start = 15, |
@@ -66,11 +89,13 @@ static struct platform_device mtx1_gpio_leds = { | |||
66 | 89 | ||
67 | static struct __initdata platform_device * mtx1_devs[] = { | 90 | static struct __initdata platform_device * mtx1_devs[] = { |
68 | &mtx1_gpio_leds, | 91 | &mtx1_gpio_leds, |
69 | &mtx1_wdt | 92 | &mtx1_wdt, |
93 | &mtx1_button | ||
70 | }; | 94 | }; |
71 | 95 | ||
72 | static int __init mtx1_register_devices(void) | 96 | static int __init mtx1_register_devices(void) |
73 | { | 97 | { |
98 | gpio_direction_input(207); | ||
74 | return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs)); | 99 | return platform_add_devices(mtx1_devs, ARRAY_SIZE(mtx1_devs)); |
75 | } | 100 | } |
76 | 101 | ||