From patchwork Thu Jan 4 15:49:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Seibold X-Patchwork-Id: 760964 Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82C63249F5 for ; Thu, 4 Jan 2024 15:49:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bernhard-seibold.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bernhard-seibold.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bernhard-seibold.de header.i=@bernhard-seibold.de header.b="QmPL964c" Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4T5WHb117bz9ssn; Thu, 4 Jan 2024 16:49:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bernhard-seibold.de; s=MBO0001; t=1704383387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OHPVlduRZzGfAUVMYF/x2qKCVMjH8lFztVJTg382NcI=; b=QmPL964cn4auvpOHzfy4y3o/HxUasYTeVzSCVDfo7e7rxW2g7xKeskgmdm0r/WoUvXEiuh /7eweqB/dviLkxCHOv6DIg2s8PpxOl9IZHpPk+5BV85JLVu1T2UjURDFxQuno1bgO9qtwB trYZZeUW46Ea+5NxTU1ZzZlKp6iQDdgnNHQnQHELcR71YaVYaU/qpCu3bJgAbkUu+moPiq OSg5OIA5HEnvr3Of1pZ0D7GsdPXnfhfeRO5cCcWIxoeVJa2jw6isl/qc3iO8IYsixpC5xz WQrhmjHWRofspN1ertbBUz5hv9vJ7IV3qrXBuGMj/9PB14fB5hFmPGqT/nMi6w== From: Bernhard Seibold To: linux-input@vger.kernel.org Cc: Jiri Kosina , Benjamin Tissoires , Dmitry Torokhov , Hans de Goede , Jamie Lentin , Bernhard Seibold Subject: [PATCH 2/3] Input: leds - add micmute and triggers Date: Thu, 4 Jan 2024 16:49:40 +0100 Message-ID: <20240104154941.6919-2-mail@bernhard-seibold.de> In-Reply-To: <20240104154941.6919-1-mail@bernhard-seibold.de> References: <20240104154941.6919-1-mail@bernhard-seibold.de> Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 4T5WHb117bz9ssn Add microphone mute and add default triggers for mute and micmute Signed-off-by: Bernhard Seibold --- 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" },