• Hans de Goede's avatar
    leds: class: Add new optional brightness_hw_changed attribute · 0cb8eb30
    Hans de Goede authored
    Some LEDs may have their brightness level changed autonomously
    (outside of kernel control) by hardware / firmware. This commit
    adds support for an optional brightness_hw_changed attribute to
    signal such changes to userspace (if a driver can detect them):
    
    What:		/sys/class/leds/<led>/brightness_hw_changed
    Date:		January 2017
    KernelVersion:	4.11
    Description:
    		Last hardware set brightness level for this LED. Some LEDs
    		may be changed autonomously by hardware/firmware. Only LEDs
    		where this happens and the driver can detect this, will
    		have this file.
    
    		This file supports poll() to detect when the hardware
    		changes the brightness.
    
    		Reading this file will return the last brightness level set
    		by the hardware, this may be different from the current
    		brightness.
    
    Drivers which want to support this, simply add LED_BRIGHT_HW_CHANGED to
    their flags field and call led_classdev_notify_brightness_hw_changed()
    with the hardware set brightness when they detect a hardware / firmware
    triggered brightness change.
    Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
    Acked-by: Pavel Machek's avatarPavel Machek <pavel@ucw.cz>
    Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
    0cb8eb30
Name
Last commit
Last update
..
00-INDEX Loading commit data...
leds-blinkm.txt Loading commit data...
leds-class-flash.txt Loading commit data...
leds-class.txt Loading commit data...
leds-lm3556.txt Loading commit data...
leds-lp3944.txt Loading commit data...
leds-lp5521.txt Loading commit data...
leds-lp5523.txt Loading commit data...
leds-lp5562.txt Loading commit data...
leds-lp55xx.txt Loading commit data...
leds-mlxcpld.txt Loading commit data...
ledtrig-oneshot.txt Loading commit data...
ledtrig-transient.txt Loading commit data...
ledtrig-usbport.txt Loading commit data...
uleds.txt Loading commit data...