aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2440/mach-rx1950.c
diff options
context:
space:
mode:
authorVasily Khoruzhick <anarsoul@gmail.com>2010-09-07 10:32:25 -0400
committerBen Dooks <ben-linux@fluff.org>2010-09-26 19:26:33 -0400
commit9c1a47cf1e8978394399198b6b296c10f3a8dbfe (patch)
tree74149d69c66be49832bc08bfbf09f38b3d88adea /arch/arm/mach-s3c2440/mach-rx1950.c
parentecab01d46c68370f347b2c1125cb90070813c799 (diff)
ARM: rx1950: Add LEDs support
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c2440/mach-rx1950.c')
-rw-r--r--arch/arm/mach-s3c2440/mach-rx1950.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2440/mach-rx1950.c b/arch/arm/mach-s3c2440/mach-rx1950.c
index a4d8c15da251..adfbb3046c86 100644
--- a/arch/arm/mach-s3c2440/mach-rx1950.c
+++ b/arch/arm/mach-s3c2440/mach-rx1950.c
@@ -29,6 +29,7 @@
29#include <linux/pwm_backlight.h> 29#include <linux/pwm_backlight.h>
30#include <linux/pwm.h> 30#include <linux/pwm.h>
31#include <linux/s3c_adc_battery.h> 31#include <linux/s3c_adc_battery.h>
32#include <linux/leds.h>
32 33
33#include <linux/mtd/mtd.h> 34#include <linux/mtd/mtd.h>
34#include <linux/mtd/partitions.h> 35#include <linux/mtd/partitions.h>
@@ -259,6 +260,37 @@ void rx1950_disable_charger(void)
259 gpio_direction_output(S3C2410_GPJ(3), 0); 260 gpio_direction_output(S3C2410_GPJ(3), 0);
260} 261}
261 262
263static struct gpio_led rx1950_leds_desc[] = {
264 {
265 .name = "Green",
266 .default_trigger = "main-battery-charging-or-full",
267 .gpio = S3C2410_GPA(6),
268 },
269 {
270 .name = "Red",
271 .default_trigger = "main-battery-full",
272 .gpio = S3C2410_GPA(7),
273 },
274 {
275 .name = "Blue",
276 .default_trigger = "rx1950-acx-mem",
277 .gpio = S3C2410_GPA(11),
278 },
279};
280
281static struct gpio_led_platform_data rx1950_leds_pdata = {
282 .num_leds = ARRAY_SIZE(rx1950_leds_desc),
283 .leds = rx1950_leds_desc,
284};
285
286static struct platform_device rx1950_leds = {
287 .name = "leds-gpio",
288 .id = -1,
289 .dev = {
290 .platform_data = &rx1950_leds_pdata,
291 },
292};
293
262static struct s3c_adc_bat_pdata rx1950_bat_cfg = { 294static struct s3c_adc_bat_pdata rx1950_bat_cfg = {
263 .init = rx1950_bat_init, 295 .init = rx1950_bat_init,
264 .exit = rx1950_bat_exit, 296 .exit = rx1950_bat_exit,
@@ -663,6 +695,7 @@ static struct platform_device *rx1950_devices[] __initdata = {
663 &rx1950_device_gpiokeys, 695 &rx1950_device_gpiokeys,
664 &power_supply, 696 &power_supply,
665 &rx1950_battery, 697 &rx1950_battery,
698 &rx1950_leds,
666}; 699};
667 700
668static struct clk *rx1950_clocks[] __initdata = { 701static struct clk *rx1950_clocks[] __initdata = {