leds: trigger: Introduce audio mute LED trigger
authorTakashi Iwai <tiwai@suse.de>
Mon, 26 Nov 2018 16:47:44 +0000 (17:47 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 28 Nov 2018 11:28:30 +0000 (12:28 +0100)
commitfaa2541f5b1afa8b6d777a73bc2f27d5c8c98695
tree554ede6ec6bc2e5cba43240b633ff0c726f6a270
parent9ff01193a20d391e8dbce4403dd5ef87c7eaaca6
leds: trigger: Introduce audio mute LED trigger

This patch adds a new LED trigger for coupling the audio mixer change
with the LED on laptops or other devices.  Currently there are two
trigger types, "audio-mute" and "audio-micmute".

The audio driver triggers the LED brightness change via
ledtrig_audio_set() call with the proper type (either mute or
mic-mute).  OTOH, the consumers may call ledtrig_audio_get() for the
initial brightness value that may have been set by the audio driver
beforehand.

This new stuff will be used by HD-audio codec driver and some platform
drivers (thinkpad_acpi and dell-laptop, also upcoming huawei-wmi).

Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
drivers/leds/trigger/Kconfig
drivers/leds/trigger/Makefile
drivers/leds/trigger/ledtrig-audio.c [new file with mode: 0644]
include/linux/leds.h