8 #include <linux/kernel.h>
11 #include <linux/slab.h>
14 #include <mach/hardware.h>
15 #include <mach/platform.h>
17 #ifdef VERSATILE_SYS_BASE
18 #define LEDREG (__io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_LED_OFFSET)
21 #ifdef REALVIEW_SYS_BASE
22 #define LEDREG (__io_address(REALVIEW_SYS_BASE) + REALVIEW_SYS_LED_OFFSET)
37 } versatile_leds[] = {
38 {
"versatile:0",
"heartbeat", },
39 {
"versatile:1",
"mmc0", },
40 {
"versatile:2",
"cpu0" },
41 {
"versatile:3",
"cpu1" },
42 {
"versatile:4",
"cpu2" },
43 {
"versatile:5",
"cpu3" },
71 static int __init versatile_leds_init(
void)
77 for (i = 0; i <
ARRAY_SIZE(versatile_leds); i++) {
84 led->
cdev.name = versatile_leds[
i].name;
85 led->
cdev.brightness_set = versatile_led_set;
86 led->
cdev.brightness_get = versatile_led_get;
87 led->
cdev.default_trigger = versatile_leds[
i].trigger;