All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernhard Seibold <mail@bernhard-seibold.de>
To: linux-input@vger.kernel.org
Cc: Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Hans de Goede <hdegoede@redhat.com>,
	Jamie Lentin <jm@lentin.co.uk>,
	Bernhard Seibold <mail@bernhard-seibold.de>
Subject: [PATCH 2/3] Input: leds - add micmute and triggers
Date: Thu,  4 Jan 2024 16:49:40 +0100	[thread overview]
Message-ID: <20240104154941.6919-2-mail@bernhard-seibold.de> (raw)
In-Reply-To: <20240104154941.6919-1-mail@bernhard-seibold.de>

Add microphone mute and add default triggers for mute and micmute

Signed-off-by: Bernhard Seibold <mail@bernhard-seibold.de>
---
 drivers/input/input-leds.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/input/input-leds.c b/drivers/input/input-leds.c
index 0e935914bc3a..327a7aea4f26 100644
--- a/drivers/input/input-leds.c
+++ b/drivers/input/input-leds.c
@@ -18,6 +18,12 @@
 #define VT_TRIGGER(_name)	.trigger = NULL
 #endif
 
+#if IS_ENABLED(CONFIG_LEDS_TRIGGER_AUDIO)
+#define AUDIO_TRIGGER(_name)	.trigger = _name
+#else
+#define AUDIO_TRIGGER(_name)	.trigger = NULL
+#endif
+
 static const struct {
 	const char *name;
 	const char *trigger;
@@ -29,7 +35,8 @@ static const struct {
 	[LED_KANA]	= { "kana", VT_TRIGGER("kbd-kanalock") },
 	[LED_SLEEP]	= { "sleep" } ,
 	[LED_SUSPEND]	= { "suspend" },
-	[LED_MUTE]	= { "mute" },
+	[LED_MUTE]	= { "mute", AUDIO_TRIGGER("audio-mute") },
+	[LED_MICMUTE]	= { "micmute", AUDIO_TRIGGER("audio-micmute") },
 	[LED_MISC]	= { "misc" },
 	[LED_MAIL]	= { "mail" },
 	[LED_CHARGING]	= { "charging" },
-- 
2.43.0


  reply	other threads:[~2024-01-04 15:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-04 15:49 [PATCH 1/3] HID: input - Add microphone mute LED support Bernhard Seibold
2024-01-04 15:49 ` Bernhard Seibold [this message]
2024-01-04 15:49 ` [PATCH 3/3] HID: lenovo: Remove LEDs from tpkbd Bernhard Seibold
2024-01-04 17:55 ` [PATCH 1/3] HID: input - Add microphone mute LED support Dmitry Torokhov
2024-01-04 18:46   ` Bernhard Seibold
2024-01-04 18:56     ` Dmitry Torokhov
2024-01-13 10:37   ` [PATCH v2 1/2] Input: leds - set default-trigger for mute Bernhard Seibold
2024-01-13 10:37     ` [PATCH v2 2/2] HID: input: add support for micmute LED Bernhard Seibold

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=20240104154941.6919-2-mail@bernhard-seibold.de \
    --to=mail@bernhard-seibold.de \
    --cc=benjamin.tissoires@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=jikos@kernel.org \
    --cc=jm@lentin.co.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.