aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/zylonite.c
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-06-17 07:03:54 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-07-09 16:38:33 -0400
commit5c9f50e90e8056fb5a8bdd479ab0591d5dad79a0 (patch)
treef23cc01fa81116402d40a3db91d788e9cd7e5985 /arch/arm/mach-pxa/zylonite.c
parenta1f7fc48c143537e2bf70affee7e8932f5be9bb4 (diff)
[ARM] pxa: add simple gpio debug LEDs support for zylonite
Signed-off-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/zylonite.c')
-rw-r--r--arch/arm/mach-pxa/zylonite.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/zylonite.c b/arch/arm/mach-pxa/zylonite.c
index 13ab2985a026..4a4711d36e73 100644
--- a/arch/arm/mach-pxa/zylonite.c
+++ b/arch/arm/mach-pxa/zylonite.c
@@ -38,6 +38,8 @@
38struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS]; 38struct platform_mmc_slot zylonite_mmc_slot[MAX_SLOTS];
39 39
40int gpio_eth_irq; 40int gpio_eth_irq;
41int gpio_debug_led1;
42int gpio_debug_led2;
41 43
42int wm9713_irq; 44int wm9713_irq;
43 45
@@ -64,6 +66,42 @@ static struct platform_device smc91x_device = {
64 .resource = smc91x_resources, 66 .resource = smc91x_resources,
65}; 67};
66 68
69#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
70static struct gpio_led zylonite_debug_leds[] = {
71 [0] = {
72 .name = "zylonite:yellow:1",
73 .default_trigger = "heartbeat",
74 },
75 [1] = {
76 .name = "zylonite:yellow:2",
77 .default_trigger = "default-on",
78 },
79};
80
81static struct gpio_led_platform_data zylonite_debug_leds_info = {
82 .leds = zylonite_debug_leds,
83 .num_leds = ARRAY_SIZE(zylonite_debug_leds),
84};
85
86static struct platform_device zylonite_device_leds = {
87 .name = "leds-gpio",
88 .id = -1,
89 .dev = {
90 .platform_data = &zylonite_debug_leds_info,
91 }
92};
93
94static void __init zylonite_init_leds(void)
95{
96 zylonite_debug_leds[0].gpio = gpio_debug_led1;
97 zylonite_debug_leds[1].gpio = gpio_debug_led2;
98
99 platform_device_register(&zylonite_device_leds);
100}
101#else
102static inline void zylonite_init_leds(void) {}
103#endif
104
67#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE) 105#if defined(CONFIG_FB_PXA) || defined(CONFIG_FB_PXA_MODULE)
68static struct platform_pwm_backlight_data zylonite_backlight_data = { 106static struct platform_pwm_backlight_data zylonite_backlight_data = {
69 .pwm_id = 3, 107 .pwm_id = 3,
@@ -395,6 +433,7 @@ static void __init zylonite_init(void)
395 zylonite_init_mmc(); 433 zylonite_init_mmc();
396 zylonite_init_keypad(); 434 zylonite_init_keypad();
397 zylonite_init_nand(); 435 zylonite_init_nand();
436 zylonite_init_leds();
398} 437}
399 438
400MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)") 439MACHINE_START(ZYLONITE, "PXA3xx Platform Development Kit (aka Zylonite)")