remarkable-linux/drivers/leds
Hans de Goede 0cb8eb30d4 leds: class: Add new optional brightness_hw_changed attribute
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: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2017-01-29 19:59:42 +01:00
..
trigger cpu/hotplug: Cleanup state names 2016-12-25 10:47:44 +01:00
dell-led.c dell-led: use dell_smbios_send_request() for performing SMBIOS calls 2016-03-23 10:05:44 -07:00
Kconfig leds: class: Add new optional brightness_hw_changed attribute 2017-01-29 19:59:42 +01:00
led-class-flash.c
led-class.c leds: class: Add new optional brightness_hw_changed attribute 2017-01-29 19:59:42 +01:00
led-core.c led: core: Fix blink_brightness setting race 2016-11-22 12:07:05 +01:00
led-triggers.c leds: triggers: Check return value of kobject_uevent_env() 2016-09-20 10:22:10 +02:00
leds-88pm860x.c leds: 88pm860x: Use devm_led_classdev_register 2016-03-14 09:22:22 +01:00
leds-aat1290.c
leds-adp5520.c
leds-asic3.c
leds-bcm6328.c
leds-bcm6358.c
leds-bd2802.c
leds-blinkm.c
leds-clevo-mail.c
leds-cobalt-qube.c
leds-cobalt-raq.c leds: leds-cobalt-raq: use builtin_platform_driver 2016-11-23 16:38:01 +01:00
leds-da903x.c leds: da903x: Use devm_led_classdev_register 2016-03-14 09:22:22 +01:00
leds-da9052.c
leds-dac124s085.c
leds-fsg.c
leds-gpio-register.c
leds-gpio.c leds: gpio: fix and simplify error handling in gpio_leds_create 2016-09-15 16:49:43 +02:00
leds-hp6xx.c leds: convert IDE trigger to common disk trigger 2016-06-20 09:57:56 +02:00
leds-ipaq-micro.c
leds-is31fl32xx.c leds: is31fl32xx: define complete i2c_device_id table 2016-07-19 13:58:42 +02:00
leds-is31fl319x.c leds: is31fl319x: 1/3/6/9-channel light effect led driver 2016-08-15 14:02:31 +02:00
leds-ktd2692.c leds: ktd2692: avoid harmless maybe-uninitialized warning 2017-01-26 21:16:38 +01:00
leds-lm355x.c
leds-lm3530.c
leds-lm3533.c leds: lm3533: Use devm_led_classdev_register 2016-03-14 09:22:21 +01:00
leds-lm3642.c
leds-locomo.c
leds-lp55xx-common.c
leds-lp55xx-common.h
leds-lp3944.c leds: lp3944: improve wording and formatting in a comment 2016-03-14 09:22:20 +01:00
leds-lp3952.c leds: lp3952: Export I2C module alias information for module autoload 2016-11-22 12:07:03 +01:00
leds-lp5521.c
leds-lp5523.c
leds-lp5562.c
leds-lp8501.c
leds-lp8788.c leds: lp8788: Use devm_led_classdev_register 2016-03-14 09:22:22 +01:00
leds-lp8860.c
leds-lt3593.c
leds-max8997.c leds: max8997: Use devm_led_classdev_register 2016-03-14 09:22:23 +01:00
leds-max77693.c
leds-mc13783.c leds: mc13783: Fix MC13892 keypad led access 2016-11-22 12:07:03 +01:00
leds-menf21bmc.c
leds-mlxcpld.c leds: verify vendor and change license in mlxcpld driver 2016-11-22 12:07:04 +01:00
leds-net48xx.c
leds-netxbig.c leds: netxbig: fix module autoload for OF registration 2016-11-30 11:10:27 +01:00
leds-nic78bx.c leds: Add user LED driver for NIC78bx device 2016-11-22 12:07:04 +01:00
leds-ns2.c
leds-ot200.c
leds-pca955x.c leds: pca955x: Add ACPI support 2016-12-02 09:31:50 +01:00
leds-pca963x.c leds: pca963x: Add ACPI support 2016-11-30 11:10:09 +01:00
leds-pca9532.c leds: pca9532: Use default trigger value from platform data 2016-11-22 12:07:04 +01:00
leds-pm8058.c leds: add PM8058 LEDs driver 2016-08-16 22:37:26 +02:00
leds-powernv.c powerpc/opal: Add inline function to get rc from an ASYNC_COMP opal_msg 2016-06-29 17:33:18 +10:00
leds-pwm.c leds: pwm: Use pwm_get_args() where appropriate 2016-05-17 14:45:02 +02:00
leds-rb532.c
leds-regulator.c
leds-s3c24xx.c leds: s3c24xx: Use devm_led_classdev_register 2016-03-14 09:22:22 +01:00
leds-sead3.c
leds-ss4200.c leds: ss4200: add DMI data for FSC SCALEO Home Server 2016-04-19 09:03:20 +02:00
leds-sunfire.c
leds-syscon.c
leds-tca6507.c leds: tca6507: silence an uninitialized variable warning 2016-04-14 13:08:58 +02:00
leds-tlc591xx.c
leds-versatile.c
leds-wm831x-status.c leds: wm831x-status: Use devm_led_classdev_register 2016-03-14 09:22:22 +01:00
leds-wm8350.c
leds-wrap.c
leds.h leds: triggers: Allow to switch the trigger to "panic" on a kernel panic 2016-05-06 10:22:09 +02:00
Makefile leds: Add user LED driver for NIC78bx device 2016-11-22 12:07:04 +01:00
uleds.c leds: Introduce userspace LED class driver 2016-11-22 12:07:02 +01:00