diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-25 11:40:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-01-25 11:40:02 -0500 |
commit | 7556afa0e0e436cad4f560ee83e5fbd5dac9359a (patch) | |
tree | c1500918b4b7c8b760feab1c8eeb8a815d2135ca /arch/avr32/boards/atstk1000/setup.c | |
parent | e07dd2ad305f6b29b47d713600aa8b722ef2a9f7 (diff) | |
parent | d6c49a7a78fc841418bbd58bda504076f80ec51d (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hskinnemoen/avr32-2.6:
[AVR32] extint: Set initial irq type to low level
[AVR32] extint: change set_irq_type() handling
[AVR32] NMI debugging
[AVR32] constify function pointer tables
[AVR32] ATNGW100: Update defconfig
[AVR32] ATSTK1002: Update defconfig
[AVR32] Kconfig: Choose daughterboard instead of CPU
[AVR32] Add support for ATSTK1003 and ATSTK1004
[AVR32] Clean up external DAC setup code
[AVR32] ATSTK1000: Move gpio-leds setup to setup.c
[AVR32] Add support for AT32AP7001 and AT32AP7002
[AVR32] Provide more CPU information in /proc/cpuinfo and dmesg
[AVR32] Oprofile support
[AVR32] Include instrumentation menu
Disable VGA text console for AVR32 architecture
[AVR32] Enable debugging only when needed
ptrace: Call arch_ptrace_attach() when request=PTRACE_TRACEME
[AVR32] Remove redundant try_to_freeze() call from do_signal()
[AVR32] Drop GFP_COMP for DMA memory allocations
Diffstat (limited to 'arch/avr32/boards/atstk1000/setup.c')
-rw-r--r-- | arch/avr32/boards/atstk1000/setup.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/arch/avr32/boards/atstk1000/setup.c b/arch/avr32/boards/atstk1000/setup.c index c9af409ada9a..8bedf93876a3 100644 --- a/arch/avr32/boards/atstk1000/setup.c +++ b/arch/avr32/boards/atstk1000/setup.c | |||
@@ -10,13 +10,17 @@ | |||
10 | #include <linux/bootmem.h> | 10 | #include <linux/bootmem.h> |
11 | #include <linux/fb.h> | 11 | #include <linux/fb.h> |
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | ||
13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
14 | #include <linux/linkage.h> | 15 | #include <linux/linkage.h> |
15 | 16 | ||
16 | #include <video/atmel_lcdc.h> | 17 | #include <video/atmel_lcdc.h> |
17 | 18 | ||
18 | #include <asm/setup.h> | 19 | #include <asm/setup.h> |
20 | |||
21 | #include <asm/arch/at32ap700x.h> | ||
19 | #include <asm/arch/board.h> | 22 | #include <asm/arch/board.h> |
23 | #include <asm/arch/portmux.h> | ||
20 | 24 | ||
21 | #include "atstk1000.h" | 25 | #include "atstk1000.h" |
22 | 26 | ||
@@ -61,3 +65,63 @@ struct atmel_lcdfb_info __initdata atstk1000_lcdc_data = { | |||
61 | .default_monspecs = &atstk1000_default_monspecs, | 65 | .default_monspecs = &atstk1000_default_monspecs, |
62 | .guard_time = 2, | 66 | .guard_time = 2, |
63 | }; | 67 | }; |
68 | |||
69 | #ifdef CONFIG_BOARD_ATSTK1000_J2_LED | ||
70 | #include <linux/leds.h> | ||
71 | |||
72 | static struct gpio_led stk1000_j2_led[] = { | ||
73 | #ifdef CONFIG_BOARD_ATSTK1000_J2_LED8 | ||
74 | #define LEDSTRING "J2 jumpered to LED8" | ||
75 | { .name = "led0:amber", .gpio = GPIO_PIN_PB( 8), }, | ||
76 | { .name = "led1:amber", .gpio = GPIO_PIN_PB( 9), }, | ||
77 | { .name = "led2:amber", .gpio = GPIO_PIN_PB(10), }, | ||
78 | { .name = "led3:amber", .gpio = GPIO_PIN_PB(13), }, | ||
79 | { .name = "led4:amber", .gpio = GPIO_PIN_PB(14), }, | ||
80 | { .name = "led5:amber", .gpio = GPIO_PIN_PB(15), }, | ||
81 | { .name = "led6:amber", .gpio = GPIO_PIN_PB(16), }, | ||
82 | { .name = "led7:amber", .gpio = GPIO_PIN_PB(30), | ||
83 | .default_trigger = "heartbeat", }, | ||
84 | #else /* RGB */ | ||
85 | #define LEDSTRING "J2 jumpered to RGB LEDs" | ||
86 | { .name = "r1:red", .gpio = GPIO_PIN_PB( 8), }, | ||
87 | { .name = "g1:green", .gpio = GPIO_PIN_PB(10), }, | ||
88 | { .name = "b1:blue", .gpio = GPIO_PIN_PB(14), }, | ||
89 | |||
90 | { .name = "r2:red", .gpio = GPIO_PIN_PB( 9), | ||
91 | .default_trigger = "heartbeat", }, | ||
92 | { .name = "g2:green", .gpio = GPIO_PIN_PB(13), }, | ||
93 | { .name = "b2:blue", .gpio = GPIO_PIN_PB(15), | ||
94 | .default_trigger = "heartbeat", }, | ||
95 | /* PB16, PB30 unused */ | ||
96 | #endif | ||
97 | }; | ||
98 | |||
99 | static struct gpio_led_platform_data stk1000_j2_led_data = { | ||
100 | .num_leds = ARRAY_SIZE(stk1000_j2_led), | ||
101 | .leds = stk1000_j2_led, | ||
102 | }; | ||
103 | |||
104 | static struct platform_device stk1000_j2_led_dev = { | ||
105 | .name = "leds-gpio", | ||
106 | .id = 2, /* gpio block J2 */ | ||
107 | .dev = { | ||
108 | .platform_data = &stk1000_j2_led_data, | ||
109 | }, | ||
110 | }; | ||
111 | |||
112 | void __init atstk1000_setup_j2_leds(void) | ||
113 | { | ||
114 | unsigned i; | ||
115 | |||
116 | for (i = 0; i < ARRAY_SIZE(stk1000_j2_led); i++) | ||
117 | at32_select_gpio(stk1000_j2_led[i].gpio, AT32_GPIOF_OUTPUT); | ||
118 | |||
119 | printk("STK1000: " LEDSTRING "\n"); | ||
120 | platform_device_register(&stk1000_j2_led_dev); | ||
121 | } | ||
122 | #else /* CONFIG_BOARD_ATSTK1000_J2_LED */ | ||
123 | void __init atstk1000_setup_j2_leds(void) | ||
124 | { | ||
125 | |||
126 | } | ||
127 | #endif /* CONFIG_BOARD_ATSTK1000_J2_LED */ | ||