summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-04-04 11:04:30 +0300
committerJiri Kosina <jkosina@suse.cz>2021-04-07 13:48:19 +0300
commite2da5ff435d64b59880648269c136484bea5c312 (patch)
tree43edc571a10ad616ea9c76b7b3d20d2ba1be236a /drivers/hid
parent617103246cfd19af837e4cb614ba9f877c4f7779 (diff)
downloadlinux-e2da5ff435d64b59880648269c136484bea5c312.tar.xz
HID: lenovo: Set default_triggers for the mute and micmute LEDs
The mute and mic-mute LEDs should be automatically turned on/off based on the audio-card's mixer settings. Add the standardized default-trigger names for this, so that the alsa code can turn the LEDs on/off as appropriate (on supported audio cards). This brings the mute/mic-mute LED support inline with the thinkpad_acpi support for the same LEDs in keyboards directly connected to the laptop's embedded-controller. Reviewed-by: Marek BehĂșn <kabel@kernel.org> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-lenovo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index 2cf89b880ac5..2287142116b9 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -824,6 +824,7 @@ static int lenovo_register_leds(struct hid_device *hdev)
snprintf(name_micm, name_sz, "%s:amber:micmute", dev_name(&hdev->dev));
data->led_mute.name = name_mute;
+ data->led_mute.default_trigger = "audio-mute";
data->led_mute.brightness_set_blocking = lenovo_led_brightness_set;
data->led_mute.max_brightness = 1;
data->led_mute.flags = LED_HW_PLUGGABLE;
@@ -833,6 +834,7 @@ static int lenovo_register_leds(struct hid_device *hdev)
return ret;
data->led_micmute.name = name_micm;
+ data->led_micmute.default_trigger = "audio-micmute";
data->led_micmute.brightness_set_blocking = lenovo_led_brightness_set;
data->led_micmute.max_brightness = 1;
data->led_micmute.flags = LED_HW_PLUGGABLE;