linux/drivers/leds
Matthieu CASTET 2b83ff96f5 led: core: Fix brightness setting when setting delay_off=0
With the current code, the following sequence won't work :
echo timer > trigger

echo 0 >  delay_off
* at this point we call
** led_delay_off_store
** led_blink_set
*** stop timer
** led_blink_setup
** led_set_software_blink
*** if !delay_on, led off
*** if !delay_off, set led_set_brightness_nosleep <--- LED_BLINK_SW is set but timer is stop
*** otherwise start timer/set LED_BLINK_SW flag

echo xxx > brightness
* led_set_brightness
** if LED_BLINK_SW
*** if brightness=0, led off
*** else apply brightness if next timer <--- timer is stop, and will never apply new setting
** otherwise set led_set_brightness_nosleep

To fix that, when we delete the timer, we should clear LED_BLINK_SW.

Cc: linux-leds@vger.kernel.org
Signed-off-by: Matthieu CASTET <matthieu.castet@parrot.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2017-12-27 20:45:07 +01:00
..
trigger LED updates for 4.15rc1 2017-11-14 18:09:31 -08:00
Kconfig leds: Add driver for PC Engines APU/APU2 LEDs 2017-11-06 22:05:00 +01:00
led-class-flash.c
led-class.c
led-core.c led: core: Fix brightness setting when setting delay_off=0 2017-12-27 20:45:07 +01:00
led-triggers.c
leds-88pm860x.c
leds-aat1290.c LED updates for 4.14 2017-09-07 14:33:13 -07:00
leds-adp5520.c
leds-apu.c leds: Add driver for PC Engines APU/APU2 LEDs 2017-11-06 22:05:00 +01:00
leds-as3645a.c as3645a: Unregister indicator LED on device unbind 2017-09-23 21:17:43 +02:00
leds-asic3.c
leds-bcm6328.c
leds-bcm6358.c
leds-bd2802.c
leds-blinkm.c leds: blinkm: constify attribute_group structures. 2017-08-04 21:54:15 +02:00
leds-clevo-mail.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
leds-cobalt-qube.c
leds-cobalt-raq.c
leds-cpcap.c
leds-da903x.c
leds-da9052.c
leds-dac124s085.c
leds-fsg.c
leds-gpio-register.c
leds-gpio.c leds: gpio: Allow LED to retain state at shutdown 2017-08-29 21:10:40 +02:00
leds-hp6xx.c
leds-ipaq-micro.c
leds-is31fl32xx.c leds: Convert to using %pOF instead of full_name 2017-08-12 23:50:07 +02:00
leds-is31fl319x.c
leds-ktd2692.c
leds-lm355x.c
leds-lm3530.c
leds-lm3533.c leds: lm3533: constify attribute_group structure 2017-08-29 21:10:37 +02:00
leds-lm3642.c
leds-locomo.c
leds-lp55xx-common.c
leds-lp55xx-common.h
leds-lp3944.c
leds-lp3952.c
leds-lp5521.c leds: lp5521: make several arrays static const 2017-08-29 21:10:38 +02:00
leds-lp5523.c leds: lp55xx: fix spelling mistake: 'cound' -> 'could' 2017-10-30 20:39:33 +01:00
leds-lp5562.c leds: lp5562: make several arrays static const 2017-08-29 21:10:39 +02:00
leds-lp8501.c leds: lp8501: make several arrays static const 2017-08-29 21:10:39 +02:00
leds-lp8788.c
leds-lp8860.c
leds-lt3593.c
leds-max8997.c
leds-max77693.c media: v4l2-flash-led-class: Create separate sub-devices for indicators 2017-08-26 20:26:35 -04:00
leds-mc13783.c
leds-menf21bmc.c
leds-mlxcpld.c
leds-mt6323.c
leds-net48xx.c
leds-netxbig.c
leds-nic78bx.c
leds-ns2.c
leds-ot200.c
leds-pca955x.c leds: pca955x: Don't invert requested value in pca955x_gpio_set_value() 2017-10-06 21:31:03 +02:00
leds-pca963x.c
leds-pca9532.c
leds-pm8058.c
leds-powernv.c leds: powernv: Delete an error message for a failed memory allocation in powernv_led_create() 2017-08-29 21:10:39 +02:00
leds-pwm.c
leds-rb532.c
leds-regulator.c
leds-s3c24xx.c
leds-ss4200.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
leds-sunfire.c
leds-syscon.c
leds-tca6507.c leds: tca6507: Remove unnecessary reg check 2017-10-09 20:39:54 +02:00
leds-tlc591xx.c leds: tlc591xx: add missing of_node_put 2017-07-16 18:45:43 +02:00
leds-wm831x-status.c
leds-wm8350.c
leds-wrap.c
leds.h
Makefile LED updates for 4.15rc1 2017-11-14 18:09:31 -08:00
uleds.c