Skip to content

Commit

Permalink
ARM: 7026/1: simpad: replace ARM specific LED code
Browse files Browse the repository at this point in the history
Remove the legacy ARM LED code for simpad devices and
register a stadard LED platform device using GPIO line
instead.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Jochen Friedrich authored and Russell King committed Oct 17, 2011
1 parent dbd406f commit d056f5a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 101 deletions.
1 change: 0 additions & 1 deletion arch/arm/mach-sa1100/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ obj-$(CONFIG_SA1100_PLEB) += pleb.o
obj-$(CONFIG_SA1100_SHANNON) += shannon.o

obj-$(CONFIG_SA1100_SIMPAD) += simpad.o
led-$(CONFIG_SA1100_SIMPAD) += leds-simpad.o

# LEDs support
obj-$(CONFIG_LEDS) += $(led-y)
Expand Down
97 changes: 0 additions & 97 deletions arch/arm/mach-sa1100/leds-simpad.c

This file was deleted.

2 changes: 0 additions & 2 deletions arch/arm/mach-sa1100/leds.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ sa1100_leds_init(void)
leds_event = adsbitsy_leds_event;
if (machine_is_pt_system3())
leds_event = system3_leds_event;
if (machine_is_simpad())
leds_event = simpad_leds_event; /* what about machine registry? including led, apm... -zecke */

leds_event(led_start);
return 0;
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-sa1100/leds.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ extern void pfs168_leds_event(led_event_t evt);
extern void graphicsmaster_leds_event(led_event_t evt);
extern void adsbitsy_leds_event(led_event_t evt);
extern void system3_leds_event(led_event_t evt);
extern void simpad_leds_event(led_event_t evt);
28 changes: 28 additions & 0 deletions arch/arm/mach-sa1100/simpad.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <linux/ioport.h>
#include <linux/input.h>
#include <linux/gpio_keys.h>
#include <linux/leds.h>
#include <linux/i2c-gpio.h>

#include "generic.h"
Expand Down Expand Up @@ -294,6 +295,32 @@ static struct platform_device simpad_polled_keys = {
},
};

/*
* GPIO LEDs
*/

static struct gpio_led simpad_leds[] = {
{
.name = "simpad:power",
.gpio = SIMPAD_CS3_LED2_ON,
.active_low = 0,
.default_trigger = "default-on",
},
};

static struct gpio_led_platform_data simpad_led_data = {
.num_leds = ARRAY_SIZE(simpad_leds),
.leds = simpad_leds,
};

static struct platform_device simpad_gpio_leds = {
.name = "leds-gpio",
.id = 0,
.dev = {
.platform_data = &simpad_led_data,
},
};

/*
* i2c
*/
Expand Down Expand Up @@ -324,6 +351,7 @@ static struct platform_device *devices[] __initdata = {
&simpad_keys,
&simpad_polled_keys,
&simpad_mq200fb,
&simpad_gpio_leds,
&simpad_i2c,
};

Expand Down

0 comments on commit d056f5a

Please sign in to comment.