summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorChrister Weinigel <christer@weinigel.se>2008-07-07 18:12:44 +0100
committerBen Dooks <ben-linux@fluff.org>2008-07-07 18:13:03 +0100
commit865cc639a636b58612becfb6a337945c022596ac (patch)
treefc1823f74fc32614219684b7a90e94d6b87c13fb /arch/arm
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/arm')
-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 631f3a9e7a6..e1351a7b40e 100644
--- a/arch/arm/mach-s3c2410/mach-n30.c
+++ b/arch/arm/mach-s3c2410/mach-n30.c
@@ -30,6 +30,7 @@
#include <asm/irq.h>
#include <asm/mach-types.h>
+#include <asm/arch/leds-gpio.h>
#include <asm/arch/regs-gpio.h>
#include <asm/mach/arch.h>
@@ -164,6 +165,40 @@ static struct platform_device n30_button_device = {
}
};
+/* This is the bluetooth LED on the device. */
+static struct s3c24xx_led_platdata n30_blue_led_pdata = {
+ .name = "blue_led",
+ .gpio = S3C2410_GPG6,
+ .def_trigger = "",
+};
+
+/* This LED is driven by the battery microcontroller, and is blinking
+ * red, blinking green or solid green when the battery is low,
+ * charging or full respectively. By driving GPD9 low, it's possible
+ * to force the LED to blink red, so call that warning LED. */
+static struct s3c24xx_led_platdata n30_warning_led_pdata = {
+ .name = "warning_led",
+ .flags = S3C24XX_LEDF_ACTLOW,
+ .gpio = S3C2410_GPD9,
+ .def_trigger = "",
+};
+
+static struct platform_device n30_blue_led = {
+ .name = "s3c24xx_led",
+ .id = 1,
+ .dev = {
+ .platform_data = &n30_blue_led_pdata,
+ },
+};
+
+static struct platform_device n30_warning_led = {
+ .name = "s3c24xx_led",
+ .id = 2,
+ .dev = {
+ .platform_data = &n30_warning_led_pdata,
+ },
+};
+
static struct platform_device *n30_devices[] __initdata = {
&s3c_device_lcd,
&s3c_device_wdt,
@@ -172,6 +207,8 @@ static struct platform_device *n30_devices[] __initdata = {
&s3c_device_usb,
&s3c_device_usbgadget,
&n30_button_device,
+ &n30_blue_led,
+ &n30_warning_led,
};
static struct s3c2410_platform_i2c n30_i2ccfg = {