aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
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
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')
-rw-r--r--drivers/hwmon/applesmc.c2
-rw-r--r--drivers/input/misc/wistron_btns.c4
-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
-rw-r--r--drivers/misc/asus-laptop.c2
-rw-r--r--drivers/net/wireless/b43/leds.c8
12 files changed, 29 insertions, 27 deletions
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 86c66c345f8b..0c94770b7f83 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -905,7 +905,7 @@ static ssize_t applesmc_key_at_index_store(struct device *dev,
905} 905}
906 906
907static struct led_classdev applesmc_backlight = { 907static struct led_classdev applesmc_backlight = {
908 .name = "smc:kbd_backlight", 908 .name = "smc::kbd_backlight",
909 .default_trigger = "nand-disk", 909 .default_trigger = "nand-disk",
910 .brightness_set = applesmc_brightness_set, 910 .brightness_set = applesmc_brightness_set,
911}; 911};
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c
index b438d998625c..72176f3d49cb 100644
--- a/drivers/input/misc/wistron_btns.c
+++ b/drivers/input/misc/wistron_btns.c
@@ -998,12 +998,12 @@ static void wistron_wifi_led_set(struct led_classdev *led_cdev,
998} 998}
999 999
1000static struct led_classdev wistron_mail_led = { 1000static struct led_classdev wistron_mail_led = {
1001 .name = "mail:green", 1001 .name = "wistron:green:mail",
1002 .brightness_set = wistron_mail_led_set, 1002 .brightness_set = wistron_mail_led_set,
1003}; 1003};
1004 1004
1005static struct led_classdev wistron_wifi_led = { 1005static struct led_classdev wistron_wifi_led = {
1006 .name = "wifi:red", 1006 .name = "wistron:red:wifi",
1007 .brightness_set = wistron_wifi_led_set, 1007 .brightness_set = wistron_wifi_led_set,
1008}; 1008};
1009 1009
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
diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c
index 0846c33296bc..3a36a294e91b 100644
--- a/drivers/misc/asus-laptop.c
+++ b/drivers/misc/asus-laptop.c
@@ -239,7 +239,7 @@ static struct workqueue_struct *led_workqueue;
239 static int object##_led_wk; \ 239 static int object##_led_wk; \
240 static DECLARE_WORK(object##_led_work, object##_led_update); \ 240 static DECLARE_WORK(object##_led_work, object##_led_update); \
241 static struct led_classdev object##_led = { \ 241 static struct led_classdev object##_led = { \
242 .name = "asus:" ledname, \ 242 .name = "asus::" ledname, \
243 .brightness_set = object##_led_set, \ 243 .brightness_set = object##_led_set, \
244 } 244 }
245 245
diff --git a/drivers/net/wireless/b43/leds.c b/drivers/net/wireless/b43/leds.c
index 0908335892db..0aac1ff511df 100644
--- a/drivers/net/wireless/b43/leds.c
+++ b/drivers/net/wireless/b43/leds.c
@@ -147,12 +147,12 @@ static void b43_map_led(struct b43_wldev *dev,
147 case B43_LED_TRANSFER: 147 case B43_LED_TRANSFER:
148 case B43_LED_APTRANSFER: 148 case B43_LED_APTRANSFER:
149 snprintf(name, sizeof(name), 149 snprintf(name, sizeof(name),
150 "b43-%s:tx", wiphy_name(hw->wiphy)); 150 "b43-%s::tx", wiphy_name(hw->wiphy));
151 b43_register_led(dev, &dev->led_tx, name, 151 b43_register_led(dev, &dev->led_tx, name,
152 ieee80211_get_tx_led_name(hw), 152 ieee80211_get_tx_led_name(hw),
153 led_index, activelow); 153 led_index, activelow);
154 snprintf(name, sizeof(name), 154 snprintf(name, sizeof(name),
155 "b43-%s:rx", wiphy_name(hw->wiphy)); 155 "b43-%s::rx", wiphy_name(hw->wiphy));
156 b43_register_led(dev, &dev->led_rx, name, 156 b43_register_led(dev, &dev->led_rx, name,
157 ieee80211_get_rx_led_name(hw), 157 ieee80211_get_rx_led_name(hw),
158 led_index, activelow); 158 led_index, activelow);
@@ -162,7 +162,7 @@ static void b43_map_led(struct b43_wldev *dev,
162 case B43_LED_RADIO_B: 162 case B43_LED_RADIO_B:
163 case B43_LED_MODE_BG: 163 case B43_LED_MODE_BG:
164 snprintf(name, sizeof(name), 164 snprintf(name, sizeof(name),
165 "b43-%s:radio", wiphy_name(hw->wiphy)); 165 "b43-%s::radio", wiphy_name(hw->wiphy));
166 b43_register_led(dev, &dev->led_radio, name, 166 b43_register_led(dev, &dev->led_radio, name,
167 b43_rfkill_led_name(dev), 167 b43_rfkill_led_name(dev),
168 led_index, activelow); 168 led_index, activelow);
@@ -173,7 +173,7 @@ static void b43_map_led(struct b43_wldev *dev,
173 case B43_LED_WEIRD: 173 case B43_LED_WEIRD:
174 case B43_LED_ASSOC: 174 case B43_LED_ASSOC:
175 snprintf(name, sizeof(name), 175 snprintf(name, sizeof(name),
176 "b43-%s:assoc", wiphy_name(hw->wiphy)); 176 "b43-%s::assoc", wiphy_name(hw->wiphy));
177 b43_register_led(dev, &dev->led_assoc, name, 177 b43_register_led(dev, &dev->led_assoc, name,
178 ieee80211_get_assoc_led_name(hw), 178 ieee80211_get_assoc_led_name(hw),
179 led_index, activelow); 179 led_index, activelow);