aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorChrister Weinigel <christer@weinigel.se>2008-07-07 13:12:44 -0400
committerBen Dooks <ben-linux@fluff.org>2008-07-07 13:13:03 -0400
commit865cc639a636b58612becfb6a337945c022596ac (patch)
treefc1823f74fc32614219684b7a90e94d6b87c13fb /arch
parent620657500263cca4a4d9845eeaeba47e03447075 (diff)
[ARM] Acer n30: LED support.
Add support for the LEDs on the Acer N30. Signed-off-by: Christer Weinigel <christer@weinigel.se> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-s3c2410/mach-n30.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2410/mach-n30.c b/arch/arm/mach-s3c2410/mach-n30.c
index 631f3a9e7a60..e1351a7b40ee 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -30,6 +30,7 @@
30#include <asm/irq.h> 30#include <asm/irq.h>
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32 32
33#include <asm/arch/leds-gpio.h>
33#include <asm/arch/regs-gpio.h> 34#include <asm/arch/regs-gpio.h>
34 35
35#include <asm/mach/arch.h> 36#include <asm/mach/arch.h>
@@ -164,6 +165,40 @@ static struct platform_device n30_button_device = {
164 } 165 }
165}; 166};
166 167
168/* This is the bluetooth LED on the device. */
169static struct s3c24xx_led_platdata n30_blue_led_pdata = {
170 .name = "blue_led",
171 .gpio = S3C2410_GPG6,
172 .def_trigger = "",
173};
174
175/* This LED is driven by the battery microcontroller, and is blinking
176 * red, blinking green or solid green when the battery is low,
177 * charging or full respectively. By driving GPD9 low, it's possible
178 * to force the LED to blink red, so call that warning LED. */
179static struct s3c24xx_led_platdata n30_warning_led_pdata = {
180 .name = "warning_led",
181 .flags = S3C24XX_LEDF_ACTLOW,
182 .gpio = S3C2410_GPD9,
183 .def_trigger = "",
184};
185
186static struct platform_device n30_blue_led = {
187 .name = "s3c24xx_led",
188 .id = 1,
189 .dev = {
190 .platform_data = &n30_blue_led_pdata,
191 },
192};
193
194static struct platform_device n30_warning_led = {
195 .name = "s3c24xx_led",
196 .id = 2,
197 .dev = {
198 .platform_data = &n30_warning_led_pdata,
199 },
200};
201
167static struct platform_device *n30_devices[] __initdata = { 202static struct platform_device *n30_devices[] __initdata = {
168 &s3c_device_lcd, 203 &s3c_device_lcd,
169 &s3c_device_wdt, 204 &s3c_device_wdt,
@@ -172,6 +207,8 @@ static struct platform_device *n30_devices[] __initdata = {
172 &s3c_device_usb, 207 &s3c_device_usb,
173 &s3c_device_usbgadget, 208 &s3c_device_usbgadget,
174 &n30_button_device, 209 &n30_button_device,
210 &n30_blue_led,
211 &n30_warning_led,
175}; 212};
176 213
177static struct s3c2410_platform_i2c n30_i2ccfg = { 214static struct s3c2410_platform_i2c n30_i2ccfg = {