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, alsa-devel@alsa-project.org Subject: [PATCH 2/3] HID: elan: Set default_trigger-s for the mute LED Date: Sat, 20 Feb 2021 17:32:10 +0100 [thread overview] Message-ID: <20210220163211.323178-2-hdegoede@redhat.com> (raw) In-Reply-To: <20210220163211.323178-1-hdegoede@redhat.com> 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(+) 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; -- 2.30.1
WARNING: multiple messages have this Message-ID (diff)
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>, alsa-devel@alsa-project.org, linux-leds@vger.kernel.org, linux-input@vger.kernel.org Subject: [PATCH 2/3] HID: elan: Set default_trigger-s for the mute LED Date: Sat, 20 Feb 2021 17:32:10 +0100 [thread overview] Message-ID: <20210220163211.323178-2-hdegoede@redhat.com> (raw) In-Reply-To: <20210220163211.323178-1-hdegoede@redhat.com> 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(+) 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; -- 2.30.1
next prev parent reply other threads:[~2021-02-20 16:33 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-02-20 16:32 [PATCH 1/3] HID: elan: Silence mute LED errors being logged when the device is unplugged Hans de Goede 2021-02-20 16:32 ` Hans de Goede 2021-02-20 16:32 ` Hans de Goede [this message] 2021-02-20 16:32 ` [PATCH 2/3] HID: elan: Set default_trigger-s for the mute LED Hans de Goede 2021-02-21 1:45 ` Marek Behún 2021-02-20 16:32 ` [PATCH 3/3] HID: elan: Remove elan_mute_led_get_brigtness() Hans de Goede 2021-02-20 16:32 ` Hans de Goede 2021-02-21 1:47 ` Marek Behún 2021-02-21 1:46 ` [PATCH 1/3] HID: elan: Silence mute LED errors being logged when the device is unplugged Marek Behún
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=20210220163211.323178-2-hdegoede@redhat.com \ --to=hdegoede@redhat.com \ --cc=alsa-devel@alsa-project.org \ --cc=benjamin.tissoires@redhat.com \ --cc=jikos@kernel.org \ --cc=linux-input@vger.kernel.org \ --cc=linux-leds@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: linkBe 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.