ARM: mach-sa1100: retire custom LED code
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
This commit is contained in:
@@ -21,6 +21,10 @@
|
||||
#include <linux/serial_core.h>
|
||||
#include <linux/mtd/mtd.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
#include <linux/tty.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/leds.h>
|
||||
#include <linux/platform_device.h>
|
||||
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/setup.h>
|
||||
@@ -183,9 +187,37 @@ static struct flash_platform_data hackkit_flash_data = {
|
||||
static struct resource hackkit_flash_resource =
|
||||
DEFINE_RES_MEM(SA1100_CS0_PHYS, SZ_32M);
|
||||
|
||||
/* LEDs */
|
||||
struct gpio_led hackkit_gpio_leds[] = {
|
||||
{
|
||||
.name = "hackkit:red",
|
||||
.default_trigger = "cpu0",
|
||||
.gpio = 22,
|
||||
},
|
||||
{
|
||||
.name = "hackkit:green",
|
||||
.default_trigger = "heartbeat",
|
||||
.gpio = 23,
|
||||
},
|
||||
};
|
||||
|
||||
static struct gpio_led_platform_data hackkit_gpio_led_info = {
|
||||
.leds = hackkit_gpio_leds,
|
||||
.num_leds = ARRAY_SIZE(hackkit_gpio_leds),
|
||||
};
|
||||
|
||||
static struct platform_device hackkit_leds = {
|
||||
.name = "leds-gpio",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.platform_data = &hackkit_gpio_led_info,
|
||||
}
|
||||
};
|
||||
|
||||
static void __init hackkit_init(void)
|
||||
{
|
||||
sa11x0_register_mtd(&hackkit_flash_data, &hackkit_flash_resource, 1);
|
||||
platform_device_register(&hackkit_leds);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
|
Reference in New Issue
Block a user