aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2009-02-16 12:40:57 -0500
committerEric Miao <eric.miao@marvell.com>2009-03-13 05:10:44 -0400
commit3b31fabfe258ecc1ffccd01dd186a534d5c804b3 (patch)
treeb2498f109a9143ee3b055fda3d734f3e515b56cb
parentaac429707df233e9dc7ed70ea04cd29d832dfe61 (diff)
[ARM] pxa: add support for CSB701 baseboard
CSB701 is one of baseboards that can be used with CSB726 SOM. This currently adds support for button and LED on the board. More to come later. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Eric Miao <eric.miao@marvell.com>
-rw-r--r--arch/arm/mach-pxa/Kconfig4
-rw-r--r--arch/arm/mach-pxa/Makefile1
-rw-r--r--arch/arm/mach-pxa/csb701.c61
3 files changed, 66 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index ff1872db5b3d..d13282d773aa 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -401,6 +401,10 @@ config MACH_CSB726
401 Say Y here if you intend to run this kernel on a Cogent 401 Say Y here if you intend to run this kernel on a Cogent
402 CSB726 System On Module. 402 CSB726 System On Module.
403 403
404config CSB726_CSB701
405 bool "Enable supprot for CSB701 baseboard"
406 depends on MACH_CSB726
407
404config PXA_EZX 408config PXA_EZX
405 bool "Motorola EZX Platform" 409 bool "Motorola EZX Platform"
406 select PXA27x 410 select PXA27x
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index 96a72f02c136..8da8e63d048b 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -76,6 +76,7 @@ obj-$(CONFIG_PXA_EZX) += ezx.o
76 76
77obj-$(CONFIG_MACH_INTELMOTE2) += imote2.o 77obj-$(CONFIG_MACH_INTELMOTE2) += imote2.o
78obj-$(CONFIG_MACH_CSB726) += csb726.o 78obj-$(CONFIG_MACH_CSB726) += csb726.o
79obj-$(CONFIG_CSB726_CSB701) += csb701.o
79 80
80# Support for blinky lights 81# Support for blinky lights
81led-y := leds.o 82led-y := leds.o
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
8static 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
19static struct gpio_keys_platform_data csb701_gpio_keys_data = {
20 .buttons = csb701_buttons,
21 .nbuttons = ARRAY_SIZE(csb701_buttons),
22};
23
24static 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
33static struct platform_device csb701_gpio_keys = {
34 .name = "gpio-keys",
35 .id = -1,
36 .dev.platform_data = &csb701_gpio_keys_data,
37};
38
39static struct gpio_led_platform_data csb701_leds_gpio_data = {
40 .leds = csb701_leds,
41 .num_leds = ARRAY_SIZE(csb701_leds),
42};
43
44static struct platform_device csb701_leds_gpio = {
45 .name = "leds-gpio",
46 .id = -1,
47 .dev.platform_data = &csb701_leds_gpio_data,
48};
49
50static struct platform_device *devices[] __initdata = {
51 &csb701_gpio_keys,
52 &csb701_leds_gpio,
53};
54
55static int __init csb701_init(void)
56{
57 return platform_add_devices(devices, ARRAY_SIZE(devices));
58}
59
60module_init(csb701_init);
61