diff mbox series

[2/3] HID: elan: Set default_trigger-s for the mute LED

Message ID 20210220163211.323178-2-hdegoede@redhat.com (mailing list archive)
State New
Delegated to: Jiri Kosina
Headers show
Series [1/3] HID: elan: Silence mute LED errors being logged when the device is unplugged | expand

Commit Message

Hans de Goede Feb. 20, 2021, 4:32 p.m. UTC
The mute LED should be automatically turned on/off based
on the audio-cards mixer settings.

Add the standardized default-trigger name for this, so that the alsa
code can turn the LED on/off as appropriate (on supported audio cards).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
 drivers/hid/hid-elan.c | 1 +
 1 file changed, 1 insertion(+)


Marek BehĂșn Feb. 21, 2021, 1:45 a.m. UTC | #1
Again I would use
  ... Set default_triggers for ...

Reviewed-by: Marek BehĂșn <kabel@kernel.org>
diff mbox series


diff --git a/drivers/hid/hid-elan.c b/drivers/hid/hid-elan.c
index 71740988a3f6..6958649ece22 100644
--- a/drivers/hid/hid-elan.c
+++ b/drivers/hid/hid-elan.c
@@ -460,6 +460,7 @@  static int elan_init_mute_led(struct hid_device *hdev)
 	struct led_classdev *mute_led = &drvdata->mute_led;
 	mute_led->name = "elan:red:mute";
+	mute_led->default_trigger = "audio-mute";
 	mute_led->brightness_get = elan_mute_led_get_brigtness;
 	mute_led->brightness_set_blocking = elan_mute_led_set_brigtness;
 	mute_led->max_brightness = LED_ON;