From: Hans de Goede <hdegoede@redhat.com>
To: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Hans de Goede <hdegoede@redhat.com>, linux-input@vger.kernel.org
Subject: [PATCH 5/5] HID: lenovo: Set default_trigger-s for the mute and micmute LEDs
Date: Mon, 15 Feb 2021 21:38:14 +0100 [thread overview]
Message-ID: <20210215203814.699633-5-hdegoede@redhat.com> (raw)
In-Reply-To: <20210215203814.699633-1-hdegoede@redhat.com>
The mute and mic-mute LEDs should be automatically turned on/off based
on the audio-cards 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 audo 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.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/hid/hid-lenovo.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c
index 045c06ba0ab8..c82e328f5310 100644
--- a/drivers/hid/hid-lenovo.c
+++ b/drivers/hid/hid-lenovo.c
@@ -829,6 +829,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_get = lenovo_led_brightness_get;
data->led_mute.brightness_set_blocking = lenovo_led_brightness_set;
data->led_mute.dev = &hdev->dev;
@@ -837,6 +838,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_get = lenovo_led_brightness_get;
data->led_micmute.brightness_set_blocking = lenovo_led_brightness_set;
data->led_micmute.dev = &hdev->dev;
--
2.30.1
prev parent reply other threads:[~2021-02-15 20:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-15 20:38 [PATCH 1/5] HID: lenovo: Fix false positive errors on setting tp10ubkbd LEDs Hans de Goede
2021-02-15 20:38 ` [PATCH 2/5] HID: lenovo: Use brightness_set_blocking callback for setting LEDs brightness Hans de Goede
2021-02-15 20:38 ` [PATCH 3/5] HID: lenovo: Check hid_get_drvdata() returns non NULL in lenovo_event() Hans de Goede
2021-02-15 20:38 ` [PATCH 4/5] HID: lenovo: Map mic-mute button to KEY_F20 instead of KEY_MICMUTE Hans de Goede
2021-02-15 20:38 ` Hans de Goede [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210215203814.699633-5-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=benjamin.tissoires@redhat.com \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).