diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-28 17:03:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-28 17:03:14 -0400 |
commit | 0fe41b8982001cd14ee2c77cd776735a5024e98b (patch) | |
tree | 83e65d595c413d55259ea14fb97748ce5efe5707 /arch/arm/mach-pxa/csb701.c | |
parent | eedf2c5296a8dfaaf9aec1a938c1d3bd73159a30 (diff) | |
parent | 9759d22c8348343b0da4e25d6150c41712686c14 (diff) |
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (422 commits)
[ARM] 5435/1: fix compile warning in sanity_check_meminfo()
[ARM] 5434/1: ARM: OMAP: Fix mailbox compile for 24xx
[ARM] pxa: fix the bad assumption that PCMCIA sockets always start with 0
[ARM] pxa: fix Colibri PXA300 and PXA320 LCD backlight pins
imxfb: Fix TFT mode
i.MX21/27: remove ifdef CONFIG_FB_IMX
imxfb: add clock support
mxc: add arch_reset() function
clkdev: add possibility to get a clock based on the device name
i.MX1: remove fb support from mach-imx
[ARM] pxa: build arch/arm/plat-pxa/mfp.c only when PXA3xx or ARCH_MMP defined
Gemini: Add support for Teltonika RUT100
Gemini: gpiolib based GPIO support v2
MAINTAINERS: add myself as Gemini architecture maintainer
ARM: Add Gemini architecture v3
[ARM] OMAP: Fix compile for omap2_init_common_hw()
MAINTAINERS: Add myself as Faraday ARM core variant maintainer
ARM: Add support for FA526 v2
[ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.h
[ARM] collie: fix two minor formatting nits
...
Diffstat (limited to 'arch/arm/mach-pxa/csb701.c')
-rw-r--r-- | arch/arm/mach-pxa/csb701.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/csb701.c b/arch/arm/mach-pxa/csb701.c new file mode 100644 index 000000000000..4a2a2952c374 --- /dev/null +++ b/arch/arm/mach-pxa/csb701.c | |||
@@ -0,0 +1,61 @@ | |||
1 | #include <linux/kernel.h> | ||
2 | #include <linux/module.h> | ||
3 | #include <linux/platform_device.h> | ||
4 | #include <linux/gpio_keys.h> | ||
5 | #include <linux/input.h> | ||
6 | #include <linux/leds.h> | ||
7 | |||
8 | static struct gpio_keys_button csb701_buttons[] = { | ||
9 | { | ||
10 | .code = 0x7, | ||
11 | .gpio = 1, | ||
12 | .active_low = 1, | ||
13 | .desc = "SW2", | ||
14 | .type = EV_SW, | ||
15 | .wakeup = 1, | ||
16 | }, | ||
17 | }; | ||
18 | |||
19 | static struct gpio_keys_platform_data csb701_gpio_keys_data = { | ||
20 | .buttons = csb701_buttons, | ||
21 | .nbuttons = ARRAY_SIZE(csb701_buttons), | ||
22 | }; | ||
23 | |||
24 | static struct gpio_led csb701_leds[] = { | ||
25 | { | ||
26 | .name = "csb701:yellow:heartbeat", | ||
27 | .default_trigger = "heartbeat", | ||
28 | .gpio = 11, | ||
29 | .active_low = 1, | ||
30 | }, | ||
31 | }; | ||
32 | |||
33 | static struct platform_device csb701_gpio_keys = { | ||
34 | .name = "gpio-keys", | ||
35 | .id = -1, | ||
36 | .dev.platform_data = &csb701_gpio_keys_data, | ||
37 | }; | ||
38 | |||
39 | static struct gpio_led_platform_data csb701_leds_gpio_data = { | ||
40 | .leds = csb701_leds, | ||
41 | .num_leds = ARRAY_SIZE(csb701_leds), | ||
42 | }; | ||
43 | |||
44 | static struct platform_device csb701_leds_gpio = { | ||
45 | .name = "leds-gpio", | ||
46 | .id = -1, | ||
47 | .dev.platform_data = &csb701_leds_gpio_data, | ||
48 | }; | ||
49 | |||
50 | static struct platform_device *devices[] __initdata = { | ||
51 | &csb701_gpio_keys, | ||
52 | &csb701_leds_gpio, | ||
53 | }; | ||
54 | |||
55 | static int __init csb701_init(void) | ||
56 | { | ||
57 | return platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
58 | } | ||
59 | |||
60 | module_init(csb701_init); | ||
61 | |||