linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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, linux-leds@vger.kernel.org,
	"Marek Behún" <kabel@kernel.org>, "Pavel Machek" <pavel@ucw.cz>
Subject: [PATCH resend 2/3] HID: elan: Set default_trigger for the mute LED
Date: Sun,  4 Apr 2021 09:52:51 +0200	[thread overview]
Message-ID: <20210404075252.4032-3-hdegoede@redhat.com> (raw)
In-Reply-To: <20210404075252.4032-1-hdegoede@redhat.com>

The mute LED should be automatically turned on/off based
on the audio-card's 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).

Reviewed-by: Marek Behún <kabel@kernel.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/hid/hid-elan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/hid-elan.c b/drivers/hid/hid-elan.c
index 473d8528319d..5173f50d474d 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;
-- 
2.30.2


  parent reply	other threads:[~2021-04-04  7:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-04  7:52 [PATCH resend 0/3] HID: elan: Mute LED support fixes Hans de Goede
2021-04-04  7:52 ` [PATCH resend 1/3] HID: elan: Silence mute LED errors being logged when the device is unplugged Hans de Goede
2021-04-04  7:52 ` Hans de Goede [this message]
2021-04-04  7:52 ` [PATCH resend 3/3] HID: elan: Remove elan_mute_led_get_brigtness() Hans de Goede
2021-04-07 10:47 ` [PATCH resend 0/3] HID: elan: Mute LED support fixes Jiri Kosina

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=20210404075252.4032-3-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=kabel@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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).