mint0x33/drivers
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
..
accessibility
acpi
amba
android
ata
atm
auxdisplay
base avoid spurious "may be used uninitialized" warning 2016-12-25 14:56:58 -08:00
bcma
block ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
bluetooth
bus
cdrom
char clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
clk
clocksource Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
connector
cpufreq
cpuidle
crypto
dax
dca
devfreq
dio
dma ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
dma-buf
edac
eisa
extcon
firewire
firmware
fmc
fpga
gpio
gpu ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
hid
hsi
hv clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
hwmon
hwspinlock
hwtracing coresight/etm3/4x: Consolidate hotplug state space 2016-12-25 10:47:44 +01:00
i2c
ide
idle
iio ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
infiniband
input ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
iommu
ipack
irqchip Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
isdn
leds leds: class: Add new optional brightness_hw_changed attribute 2017-01-29 19:59:42 +01:00
lguest
lightnvm
macintosh
mailbox ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
mcb
md
media ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
memory
memstick
message
mfd
misc
mmc
mtd
net Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
nfc
ntb
nubus
nvdimm
nvme
nvmem
of
oprofile
parisc
parport
pci ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
pcmcia
perf
phy
pinctrl
platform ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
pnp
power ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
powercap
pps
ps3
ptp
pwm
rapidio
ras
regulator
remoteproc
reset
rpmsg
rtc ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
s390 ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
sbus
scsi Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-12-25 14:30:04 -08:00
sfi
sh
sn
soc
spi
spmi
ssb
staging
target
tc
thermal
thunderbolt
tty
uio
usb ktime: Cleanup ktime_set() usage 2016-12-25 17:21:22 +01:00
uwb
vfio
vhost
video
virt
virtio
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile