diff options
| -rw-r--r-- | Documentation/leds-class.txt | 29 | ||||
| -rw-r--r-- | arch/arm/mach-ixp4xx/dsmg600-setup.c | 4 | ||||
| -rw-r--r-- | arch/arm/mach-ixp4xx/nas100d-setup.c | 6 | ||||
| -rw-r--r-- | arch/arm/mach-ixp4xx/nslu2-setup.c | 8 | ||||
| -rw-r--r-- | drivers/hwmon/applesmc.c | 2 | ||||
| -rw-r--r-- | drivers/input/misc/wistron_btns.c | 4 | ||||
| -rw-r--r-- | drivers/leds/Kconfig | 48 | ||||
| -rw-r--r-- | drivers/leds/Makefile | 3 | ||||
| -rw-r--r-- | drivers/leds/leds-ams-delta.c | 12 | ||||
| -rw-r--r-- | drivers/leds/leds-clevo-mail.c | 219 | ||||
| -rw-r--r-- | drivers/leds/leds-corgi.c | 4 | ||||
| -rw-r--r-- | drivers/leds/leds-gpio.c | 2 | ||||
| -rw-r--r-- | drivers/leds/leds-hp6xx.c | 120 | ||||
| -rw-r--r-- | drivers/leds/leds-ixp4xx-gpio.c | 214 | ||||
| -rw-r--r-- | drivers/leds/leds-locomo.c | 4 | ||||
| -rw-r--r-- | drivers/leds/leds-net48xx.c | 2 | ||||
| -rw-r--r-- | drivers/leds/leds-spitz.c | 8 | ||||
| -rw-r--r-- | drivers/leds/leds-tosa.c | 4 | ||||
| -rw-r--r-- | drivers/leds/leds-wrap.c | 47 | ||||
| -rw-r--r-- | drivers/leds/ledtrig-timer.c | 41 | ||||
| -rw-r--r-- | drivers/misc/asus-laptop.c | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/b43/leds.c | 8 | ||||
| -rw-r--r-- | include/linux/leds.h | 5 |
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 | ||
| 40 | Is currently of the form: | 40 | Is currently of the form: |
| 41 | 41 | ||
| 42 | "devicename:colour" | 42 | "devicename:colour:function" |
| 43 | 43 | ||
| 44 | There have been calls for LED properties such as colour to be exported as | 44 | There have been calls for LED properties such as colour to be exported as |
| 45 | individual led class attributes. As a solution which doesn't incur as much | 45 | individual led class attributes. As a solution which doesn't incur as much |
| 46 | overhead, I suggest these become part of the device name. The naming scheme | 46 | overhead, I suggest these become part of the device name. The naming scheme |
| 47 | above leaves scope for further attributes should they be needed. | 47 | above leaves scope for further attributes should they be needed. If sections |
| 48 | of the name don't apply, just leave that section blank. | ||
| 49 | |||
| 50 | |||
| 51 | Hardware accelerated blink of LEDs | ||
| 52 | ================================== | ||
| 53 | |||
| 54 | Some LEDs can be programmed to blink without any CPU interaction. To | ||
| 55 | support this feature, a LED driver can optionally implement the | ||
| 56 | blink_set() function (see <linux/leds.h>). If implemeted, triggers can | ||
| 57 | attempt to use it before falling back to software timers. The blink_set() | ||
| 58 | function should return 0 if the blink setting is supported, or -EINVAL | ||
| 59 | otherwise, which means that LED blinking will be handled by software. | ||
| 60 | |||
| 61 | The blink_set() function should choose a user friendly blinking | ||
| 62 | value if it is called with *delay_on==0 && *delay_off==0 parameters. In | ||
| 63 | this case the driver should give back the chosen value through delay_on | ||
| 64 | and delay_off parameters to the leds subsystem. | ||
| 65 | |||
| 66 | Any call to the brightness_set() callback function should cancel the | ||
| 67 | previously programmed hardware blinking function so setting the brightness | ||
| 68 | to 0 can also cancel the blinking of the LED. | ||
| 48 | 69 | ||
| 49 | 70 | ||
| 50 | Known Issues | 71 | Known Issues |
| @@ -55,10 +76,6 @@ would cause nightmare dependency issues. I see this as a minor issue | |||
| 55 | compared to the benefits the simple trigger functionality brings. The | 76 | compared to the benefits the simple trigger functionality brings. The |
| 56 | rest of the LED subsystem can be modular. | 77 | rest of the LED subsystem can be modular. |
| 57 | 78 | ||
| 58 | Some leds can be programmed to flash in hardware. As this isn't a generic | ||
| 59 | LED device property, this should be exported as a device specific sysfs | ||
| 60 | attribute rather than part of the class if this functionality is required. | ||
| 61 | |||
| 62 | 79 | ||
| 63 | Future Development | 80 | Future 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 | ||
| 72 | static struct gpio_led dsmg600_led_pins[] = { | 72 | static 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 | ||
| 61 | static struct gpio_led nas100d_led_pins[] = { | 61 | static 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 | ||
| 64 | static struct gpio_led nslu2_led_pins[] = { | 64 | static 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 | ||
| 907 | static struct led_classdev applesmc_backlight = { | 907 | static 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 | ||
| 1000 | static struct led_classdev wistron_mail_led = { | 1000 | static struct led_classdev wistron_mail_led = { |
