aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-10-31 10:00:07 -0400
committerRichard Purdie <rpurdie@rpsys.net>2008-02-07 04:47:00 -0500
commit6c152beefbf90579d21afc4f7e075b1f801f9a75 (patch)
treec5814496de9e29662d558deddb31e0a0c4549cd7 /drivers/leds
parentcec035de8265b18252742ef359b12e9694641112 (diff)
leds: Standardise LED naming scheme
As discussed on LKML some notion of 'function' is needed in LED naming. This patch adds this to the documentation and standardises existing LED drivers. Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-ams-delta.c12
-rw-r--r--drivers/leds/leds-clevo-mail.c2
-rw-r--r--drivers/leds/leds-corgi.c4
-rw-r--r--drivers/leds/leds-locomo.c4
-rw-r--r--drivers/leds/leds-net48xx.c2
-rw-r--r--drivers/leds/leds-spitz.c8
-rw-r--r--drivers/leds/leds-tosa.c4
-rw-r--r--drivers/leds/leds-wrap.c4
8 files changed, 21 insertions, 19 deletions
diff --git a/drivers/leds/leds-ams-delta.c b/drivers/leds/leds-ams-delta.c
index 599878c8e714..9e3077463d84 100644
--- a/drivers/leds/leds-ams-delta.c
+++ b/drivers/leds/leds-ams-delta.c
@@ -37,42 +37,42 @@ static void ams_delta_led_set(struct led_classdev *led_cdev,
37static struct ams_delta_led ams_delta_leds[] = { 37static struct ams_delta_led ams_delta_leds[] = {
38 { 38 {
39 .cdev = { 39 .cdev = {
40 .name = "ams-delta:camera", 40 .name = "ams-delta::camera",
41 .brightness_set = ams_delta_led_set, 41 .brightness_set = ams_delta_led_set,
42 }, 42 },
43 .bitmask = AMS_DELTA_LATCH1_LED_CAMERA, 43 .bitmask = AMS_DELTA_LATCH1_LED_CAMERA,
44 }, 44 },
45 { 45 {
46 .cdev = { 46 .cdev = {
47 .name = "ams-delta:advert", 47 .name = "ams-delta::advert",
48 .brightness_set = ams_delta_led_set, 48 .brightness_set = ams_delta_led_set,
49 }, 49 },
50 .bitmask = AMS_DELTA_LATCH1_LED_ADVERT, 50 .bitmask = AMS_DELTA_LATCH1_LED_ADVERT,
51 }, 51 },
52 { 52 {
53 .cdev = { 53 .cdev = {
54 .name = "ams-delta:email", 54 .name = "ams-delta::email",
55 .brightness_set = ams_delta_led_set, 55 .brightness_set = ams_delta_led_set,
56 }, 56 },
57 .bitmask = AMS_DELTA_LATCH1_LED_EMAIL, 57 .bitmask = AMS_DELTA_LATCH1_LED_EMAIL,
58 }, 58 },
59 { 59 {
60 .cdev = { 60 .cdev = {
61 .name = "ams-delta:handsfree", 61 .name = "ams-delta::handsfree",
62 .brightness_set = ams_delta_led_set, 62 .brightness_set = ams_delta_led_set,
63 }, 63 },
64 .bitmask = AMS_DELTA_LATCH1_LED_HANDSFREE, 64 .bitmask = AMS_DELTA_LATCH1_LED_HANDSFREE,
65 }, 65 },
66 { 66 {
67 .cdev = { 67 .cdev = {
68 .name = "ams-delta:voicemail", 68 .name = "ams-delta::voicemail",
69 .brightness_set = ams_delta_led_set, 69 .brightness_set = ams_delta_led_set,
70 }, 70 },
71 .bitmask = AMS_DELTA_LATCH1_LED_VOICEMAIL, 71 .bitmask = AMS_DELTA_LATCH1_LED_VOICEMAIL,
72 }, 72 },
73 { 73 {
74 .cdev = { 74 .cdev = {
75 .name = "ams-delta:voice", 75 .name = "ams-delta::voice",
76 .brightness_set = ams_delta_led_set, 76 .brightness_set = ams_delta_led_set,
77 }, 77 },
78 .bitmask = AMS_DELTA_LATCH1_LED_VOICE, 78 .bitmask = AMS_DELTA_LATCH1_LED_VOICE,
diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c
index 50aaa0b33810..49a7972459c9 100644
--- a/drivers/leds/leds-clevo-mail.c
+++ b/drivers/leds/leds-clevo-mail.c
@@ -93,7 +93,7 @@ static void clevo_mail_led_set(struct led_classdev *led_cdev,
93} 93}
94 94
95static struct led_classdev clevo_mail_led = { 95static struct led_classdev clevo_mail_led = {
96 .name = "clevo", 96 .name = "clevo::mail",
97 .brightness_set = clevo_mail_led_set, 97 .brightness_set = clevo_mail_led_set,
98}; 98};
99 99
diff --git a/drivers/leds/leds-corgi.c b/drivers/leds/leds-corgi.c
index cf1dcd719a28..e45f6c4b59ba 100644
--- a/drivers/leds/leds-corgi.c
+++ b/drivers/leds/leds-corgi.c
@@ -38,13 +38,13 @@ static void corgiled_green_set(struct led_classdev *led_cdev, enum led_brightnes
38} 38}
39 39
40static struct led_classdev corgi_amber_led = { 40static struct led_classdev corgi_amber_led = {
41 .name = "corgi:amber", 41 .name = "corgi:amber:charge",
42 .default_trigger = "sharpsl-charge", 42 .default_trigger = "sharpsl-charge",
43 .brightness_set = corgiled_amber_set, 43 .brightness_set = corgiled_amber_set,
44}; 44};
45 45
46static struct led_classdev corgi_green_led = { 46static struct led_classdev corgi_green_led = {
47 .name = "corgi:green", 47 .name = "corgi:green:mail",
48 .default_trigger = "nand-disk", 48 .default_trigger = "nand-disk",
49 .brightness_set = corgiled_green_set, 49 .brightness_set = corgiled_green_set,
50}; 50};
diff --git a/drivers/leds/leds-locomo.c b/drivers/leds/leds-locomo.c
index 2207335e9212..7295f7f52185 100644
--- a/drivers/leds/leds-locomo.c
+++ b/drivers/leds/leds-locomo.c
@@ -43,13 +43,13 @@ static void locomoled_brightness_set1(struct led_classdev *led_cdev,
43} 43}
44 44
45static struct led_classdev locomo_led0 = { 45static struct led_classdev locomo_led0 = {
46 .name = "locomo:amber", 46 .name = "locomo:amber:charge",
47 .default_trigger = "sharpsl-charge", 47 .default_trigger = "sharpsl-charge",
48 .brightness_set = locomoled_brightness_set0, 48 .brightness_set = locomoled_brightness_set0,
49}; 49};
50 50
51static struct led_classdev locomo_led1 = { 51static struct led_classdev locomo_led1 = {
52 .name = "locomo:green", 52 .name = "locomo:green:mail",
53 .default_trigger = "nand-disk", 53 .default_trigger = "nand-disk",
54 .brightness_set = locomoled_brightness_set1, 54 .brightness_set = locomoled_brightness_set1,
55}; 55};
diff --git a/drivers/leds/leds-net48xx.c b/drivers/leds/leds-net48xx.c
index 45ba3d45bcb8..054360473c94 100644
--- a/drivers/leds/leds-net48xx.c
+++ b/drivers/leds/leds-net48xx.c
@@ -31,7 +31,7 @@ static void net48xx_error_led_set(struct led_classdev *led_cdev,
31} 31}
32 32
33static struct led_classdev net48xx_error_led = { 33static struct led_classdev net48xx_error_led = {
34 .name = "net48xx:error", 34 .name = "net48xx::error",
35 .brightness_set = net48xx_error_led_set, 35 .brightness_set = net48xx_error_led_set,
36}; 36};
37 37
diff --git a/drivers/leds/leds-spitz.c b/drivers/leds/leds-spitz.c
index 126d09cc96ec..93e1012b17e6 100644
--- a/drivers/leds/leds-spitz.c
+++ b/drivers/leds/leds-spitz.c
@@ -38,13 +38,13 @@ static void spitzled_green_set(struct led_classdev *led_cdev, enum led_brightnes
38} 38}
39 39
40static struct led_classdev spitz_amber_led = { 40static struct led_classdev spitz_amber_led = {
41 .name = "spitz:amber", 41 .name = "spitz:amber:charge",
42 .default_trigger = "sharpsl-charge", 42 .default_trigger = "sharpsl-charge",
43 .brightness_set = spitzled_amber_set, 43 .brightness_set = spitzled_amber_set,
44}; 44};
45 45
46static struct led_classdev spitz_green_led = { 46static struct led_classdev spitz_green_led = {
47 .name = "spitz:green", 47 .name = "spitz:green:hddactivity",
48 .default_trigger = "ide-disk", 48 .default_trigger = "ide-disk",
49 .brightness_set = spitzled_green_set, 49 .brightness_set = spitzled_green_set,
50}; 50};
@@ -72,8 +72,10 @@ static int spitzled_probe(struct platform_device *pdev)
72{ 72{
73 int ret; 73 int ret;
74 74
75 if (machine_is_akita()) 75 if (machine_is_akita()) {
76 spitz_green_led.name = "spitz:green:mail";
76 spitz_green_led.default_trigger = "nand-disk"; 77 spitz_green_led.default_trigger = "nand-disk";
78 }
77 79
78 ret = led_classdev_register(&pdev->dev, &spitz_amber_led); 80 ret = led_classdev_register(&pdev->dev, &spitz_amber_led);
79 if (ret < 0) 81 if (ret < 0)
diff --git a/drivers/leds/leds-tosa.c b/drivers/leds/leds-tosa.c
index fb2416a38303..9e0a188fbb0a 100644
--- a/drivers/leds/leds-tosa.c
+++ b/drivers/leds/leds-tosa.c
@@ -45,13 +45,13 @@ static void tosaled_green_set(struct led_classdev *led_cdev,
45} 45}
46 46
47static struct led_classdev tosa_amber_led = { 47static struct led_classdev tosa_amber_led = {
48 .name = "tosa:amber", 48 .name = "tosa:amber:charge",
49 .default_trigger = "sharpsl-charge", 49 .default_trigger = "sharpsl-charge",
50 .brightness_set = tosaled_amber_set, 50 .brightness_set = tosaled_amber_set,
51}; 51};
52 52
53static struct led_classdev tosa_green_led = { 53static struct led_classdev tosa_green_led = {
54 .name = "tosa:green", 54 .name = "tosa:green:mail",
55 .default_trigger = "nand-disk", 55 .default_trigger = "nand-disk",
56 .brightness_set = tosaled_green_set, 56 .brightness_set = tosaled_green_set,
57}; 57};
diff --git a/drivers/leds/leds-wrap.c b/drivers/leds/leds-wrap.c
index 27fb2d8e991f..5770cc36ec20 100644
--- a/drivers/leds/leds-wrap.c
+++ b/drivers/leds/leds-wrap.c
@@ -43,12 +43,12 @@ static void wrap_extra_led_set(struct led_classdev *led_cdev,
43} 43}
44 44
45static struct led_classdev wrap_error_led = { 45static struct led_classdev wrap_error_led = {
46 .name = "wrap:error", 46 .name = "wrap::error",
47 .brightness_set = wrap_error_led_set, 47 .brightness_set = wrap_error_led_set,
48}; 48};
49 49
50static struct led_classdev wrap_extra_led = { 50static struct led_classdev wrap_extra_led = {
51 .name = "wrap:extra", 51 .name = "wrap::extra",
52 .brightness_set = wrap_extra_led_set, 52 .brightness_set = wrap_extra_led_set,
53}; 53};
54 54