aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/leds-class.txt29
-rw-r--r--arch/arm/mach-ixp4xx/dsmg600-setup.c4
-rw-r--r--arch/arm/mach-ixp4xx/nas100d-setup.c6
-rw-r--r--arch/arm/mach-ixp4xx/nslu2-setup.c8
-rw-r--r--drivers/hwmon/applesmc.c2
-rw-r--r--drivers/input/misc/wistron_btns.c4
-rw-r--r--drivers/leds/Kconfig48
-rw-r--r--drivers/leds/Makefile3
-rw-r--r--drivers/leds/leds-ams-delta.c12
-rw-r--r--drivers/leds/leds-clevo-mail.c219
-rw-r--r--drivers/leds/leds-corgi.c4
-rw-r--r--drivers/leds/leds-gpio.c2
-rw-r--r--drivers/leds/leds-hp6xx.c120
-rw-r--r--drivers/leds/leds-ixp4xx-gpio.c214
-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.c47
-rw-r--r--drivers/leds/ledtrig-timer.c41
-rw-r--r--drivers/misc/asus-laptop.c2
-rw-r--r--drivers/net/wireless/b43/leds.c8
-rw-r--r--include/linux/leds.h5
23 files changed, 519 insertions, 277 deletions
diff --git a/Documentation/leds-class.txt b/Documentation/leds-class.txt
index 8c35c0426110..56757c751d6f 100644
--- a/Documentation/leds-class.txt
+++ b/Documentation/leds-class.txt
@@ -39,12 +39,33 @@ LED Device Naming
39 39
40Is currently of the form: 40Is currently of the form:
41 41
42"devicename:colour" 42"devicename:colour:function"
43 43
44There have been calls for LED properties such as colour to be exported as 44There have been calls for LED properties such as colour to be exported as
45individual led class attributes. As a solution which doesn't incur as much 45individual led class attributes. As a solution which doesn't incur as much
46overhead, I suggest these become part of the device name. The naming scheme 46overhead, I suggest these become part of the device name. The naming scheme
47above leaves scope for further attributes should they be needed. 47above leaves scope for further attributes should they be needed. If sections
48of the name don't apply, just leave that section blank.
49
50
51Hardware accelerated blink of LEDs
52==================================
53
54Some LEDs can be programmed to blink without any CPU interaction. To
55support this feature, a LED driver can optionally implement the
56blink_set() function (see <linux/leds.h>). If implemeted, triggers can
57attempt to use it before falling back to software timers. The blink_set()
58function should return 0 if the blink setting is supported, or -EINVAL
59otherwise, which means that LED blinking will be handled by software.
60
61The blink_set() function should choose a user friendly blinking
62value if it is called with *delay_on==0 && *delay_off==0 parameters. In
63this case the driver should give back the chosen value through delay_on
64and delay_off parameters to the leds subsystem.
65
66Any call to the brightness_set() callback function should cancel the
67previously programmed hardware blinking function so setting the brightness
68to 0 can also cancel the blinking of the LED.
48 69
49 70
50Known Issues 71Known Issues
@@ -55,10 +76,6 @@ would cause nightmare dependency issues. I see this as a minor issue
55compared to the benefits the simple trigger functionality brings. The 76compared to the benefits the simple trigger functionality brings. The
56rest of the LED subsystem can be modular. 77rest of the LED subsystem can be modular.
57 78
58Some leds can be programmed to flash in hardware. As this isn't a generic
59LED device property, this should be exported as a device specific sysfs
60attribute rather than part of the class if this functionality is required.
61
62 79
63Future Development 80Future Development
64================== 81==================
diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c
index 688659668bdf..8cb07437a807 100644
--- a/arch/arm/mach-ixp4xx/dsmg600-setup.c
+++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c
@@ -71,11 +71,11 @@ static struct i2c_board_info __initdata dsmg600_i2c_board_info [] = {
71 71
72static struct gpio_led dsmg600_led_pins[] = { 72static struct gpio_led dsmg600_led_pins[] = {
73 { 73 {
74 .name = "power", 74 .name = "dsmg600:green:power",
75 .gpio = DSMG600_LED_PWR_GPIO, 75 .gpio = DSMG600_LED_PWR_GPIO,
76 }, 76 },
77 { 77 {
78 .name = "wlan", 78 .name = "dsmg600:green:wlan",
79 .gpio = DSMG600_LED_WLAN_GPIO, 79 .gpio = DSMG600_LED_WLAN_GPIO,
80 .active_low = true, 80 .active_low = true,
81 }, 81 },
diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
index 4cecae84837b..159e1c4f1eda 100644
--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
+++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
@@ -60,17 +60,17 @@ static struct i2c_board_info __initdata nas100d_i2c_board_info [] = {
60 60
61static struct gpio_led nas100d_led_pins[] = { 61static struct gpio_led nas100d_led_pins[] = {
62 { 62 {
63 .name = "wlan", /* green led */ 63 .name = "nas100d:green:wlan",
64 .gpio = NAS100D_LED_WLAN_GPIO, 64 .gpio = NAS100D_LED_WLAN_GPIO,
65 .active_low = true, 65 .active_low = true,
66 }, 66 },
67 { 67 {
68 .name = "power", /* blue power led (off=flashing) */ 68 .name = "nas100d:blue:power", /* (off=flashing) */
69 .gpio = NAS100D_LED_PWR_GPIO, 69 .gpio = NAS100D_LED_PWR_GPIO,
70 .active_low = true, 70 .active_low = true,
71 }, 71 },
72 { 72 {
73 .name = "disk", /* yellow led */ 73 .name = "nas100d:yellow:disk",
74 .gpio = NAS100D_LED_DISK_GPIO, 74 .gpio = NAS100D_LED_DISK_GPIO,
75 .active_low = true, 75 .active_low = true,
76 }, 76 },
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c
index acaebcbce53a..d9a182895a0f 100644
--- a/arch/arm/mach-ixp4xx/nslu2-setup.c
+++ b/arch/arm/mach-ixp4xx/nslu2-setup.c
@@ -63,20 +63,20 @@ static struct i2c_board_info __initdata nslu2_i2c_board_info [] = {
63 63
64static struct gpio_led nslu2_led_pins[] = { 64static struct gpio_led nslu2_led_pins[] = {
65 { 65 {
66 .name = "ready", /* green led */ 66 .name = "nslu2:green:ready",
67 .gpio = NSLU2_LED_GRN_GPIO, 67 .gpio = NSLU2_LED_GRN_GPIO,
68 }, 68 },
69 { 69 {
70 .name = "status", /* red led */ 70 .name = "nslu2:red:status",
71 .gpio = NSLU2_LED_RED_GPIO, 71 .gpio = NSLU2_LED_RED_GPIO,
72 }, 72 },
73 { 73 {
74 .name = "disk-1", 74 .name = "nslu2:green:disk-1",
75 .gpio = NSLU2_LED_DISK1_GPIO, 75 .gpio = NSLU2_LED_DISK1_GPIO,
76 .active_low = true, 76 .active_low = true,
77 }, 77 },
78 { 78 {
79 .name = "disk-2", 79 .name = "nslu2:green:disk-2",
80 .gpio = NSLU2_LED_DISK2_GPIO, 80 .gpio = NSLU2_LED_DISK2_GPIO,
81 .active_low = true, 81 .active_low = true,
82 }, 82 },
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 = {