Skip to content

Commit e2da5ff

Browse files
jwrdegoedeJiri Kosina
authored andcommitted
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 <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 6171032 commit e2da5ff

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/hid/hid-lenovo.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,7 @@ static int lenovo_register_leds(struct hid_device *hdev)
824824
snprintf(name_micm, name_sz, "%s:amber:micmute", dev_name(&hdev->dev));
825825

826826
data->led_mute.name = name_mute;
827+
data->led_mute.default_trigger = "audio-mute";
827828
data->led_mute.brightness_set_blocking = lenovo_led_brightness_set;
828829
data->led_mute.max_brightness = 1;
829830
data->led_mute.flags = LED_HW_PLUGGABLE;
@@ -833,6 +834,7 @@ static int lenovo_register_leds(struct hid_device *hdev)
833834
return ret;
834835

835836
data->led_micmute.name = name_micm;
837+
data->led_micmute.default_trigger = "audio-micmute";
836838
data->led_micmute.brightness_set_blocking = lenovo_led_brightness_set;
837839
data->led_micmute.max_brightness = 1;
838840
data->led_micmute.flags = LED_HW_PLUGGABLE;

0 commit comments

Comments
 (0)