linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger
@ 2024-03-04 20:56 Heiner Kallweit
  2024-03-04 20:57 ` [PATCH v2 1/3] leds: trigger: Store brightness set by led_trigger_event() Heiner Kallweit
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Heiner Kallweit @ 2024-03-04 20:56 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Pavel Machek, Lee Jones, Jaroslav Kysela,
	Takashi Iwai
  Cc: linux-leds@vger.kernel.org, linux-sound, linux-mips

If a simple trigger is assigned to a LED, then the LED may be off until
the next led_trigger_event() call. This may be an issue for simple
triggers with rare led_trigger_event() calls, e.g. power supply
charging indicators (drivers/power/supply/power_supply_leds.c).
Therefore persist the brightness value of the last led_trigger_event()
call and use this value if the trigger is assigned to a LED.
This change allows to use simple triggers in more cases.
As a first use case simplify handling of the mute audio trigger.

This series touches few subsystems. I'd propose to handle it via
the LED subsystem.

v2:
- Split out patch 3 from series and apply it separately via Input tree
- Improve bisectability and ensure that audio mute trigger can't be
  built twice between patches 2 and 4.

Heiner Kallweit (3):
  leds: trigger: Store brightness set by led_trigger_event()
  ALSA: control-led: Integrate mute led trigger
  leds: trigger: audio: Remove this trigger

 arch/mips/configs/ci20_defconfig     |  1 -
 drivers/leds/led-triggers.c          |  6 ++-
 drivers/leds/trigger/Kconfig         |  7 ---
 drivers/leds/trigger/Makefile        |  1 -
 drivers/leds/trigger/ledtrig-audio.c | 67 ----------------------------
 include/linux/leds.h                 | 29 ++++++------
 sound/core/Kconfig                   |  1 -
 sound/core/control_led.c             | 20 +++++++--
 8 files changed, 36 insertions(+), 96 deletions(-)
 delete mode 100644 drivers/leds/trigger/ledtrig-audio.c

-- 
2.44.0

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH v2 1/3] leds: trigger: Store brightness set by led_trigger_event()
  2024-03-04 20:56 [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger Heiner Kallweit
@ 2024-03-04 20:57 ` Heiner Kallweit
  2024-03-04 20:58 ` [PATCH v2 2/3] ALSA: control-led: Integrate mute led trigger Heiner Kallweit
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Heiner Kallweit @ 2024-03-04 20:57 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Pavel Machek, Lee Jones, Jaroslav Kysela,
	Takashi Iwai
  Cc: linux-leds@vger.kernel.org, linux-sound, linux-mips

If a simple trigger is assigned to a LED, then the LED may be off until
the next led_trigger_event() call. This may be an issue for simple
triggers with rare led_trigger_event() calls, e.g. power supply
charging indicators (drivers/power/supply/power_supply_leds.c).
Therefore persist the brightness value of the last led_trigger_event()
call and use this value if the trigger is assigned to a LED.
In addition add a getter for the trigger brightness value.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/leds/led-triggers.c |  6 ++++--
 include/linux/leds.h        | 15 +++++++++++++++
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index 0f5ac3005..b1b323b19 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -194,11 +194,11 @@ int led_trigger_set(struct led_classdev *led_cdev, struct led_trigger *trig)
 		spin_unlock(&trig->leddev_list_lock);
 		led_cdev->trigger = trig;
 
+		ret = 0;
 		if (trig->activate)
 			ret = trig->activate(led_cdev);
 		else
-			ret = 0;
-
+			led_set_brightness(led_cdev, trig->brightness);
 		if (ret)
 			goto err_activate;
 
@@ -387,6 +387,8 @@ void led_trigger_event(struct led_trigger *trig,
 	if (!trig)
 		return;
 
+	trig->brightness = brightness;
+
 	rcu_read_lock();
 	list_for_each_entry_rcu(led_cdev, &trig->led_cdevs, trig_list)
 		led_set_brightness(led_cdev, brightness);
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 7598d4729..48fff5980 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -455,6 +455,9 @@ struct led_trigger {
 	int		(*activate)(struct led_classdev *led_cdev);
 	void		(*deactivate)(struct led_classdev *led_cdev);
 
+	/* Brightness set by led_trigger_event */
+	enum led_brightness brightness;
+
 	/* LED-private triggers have this set */
 	struct led_hw_trigger_type *trigger_type;
 
@@ -508,6 +511,12 @@ static inline void *led_get_trigger_data(struct led_classdev *led_cdev)
 	return led_cdev->trigger_data;
 }
 
+static inline enum led_brightness
+led_trigger_get_brightness(const struct led_trigger *trigger)
+{
+	return trigger ? trigger->brightness : LED_OFF;
+}
+
 #define module_led_trigger(__led_trigger) \
 	module_driver(__led_trigger, led_trigger_register, \
 		      led_trigger_unregister)
@@ -544,6 +553,12 @@ static inline void *led_get_trigger_data(struct led_classdev *led_cdev)
 	return NULL;
 }
 
+static inline enum led_brightness
+led_trigger_get_brightness(const struct led_trigger *trigger)
+{
+	return LED_OFF;
+}
+
 #endif /* CONFIG_LEDS_TRIGGERS */
 
 /* Trigger specific enum */
-- 
2.44.0



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 2/3] ALSA: control-led: Integrate mute led trigger
  2024-03-04 20:56 [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger Heiner Kallweit
  2024-03-04 20:57 ` [PATCH v2 1/3] leds: trigger: Store brightness set by led_trigger_event() Heiner Kallweit
@ 2024-03-04 20:58 ` Heiner Kallweit
  2024-03-04 20:59 ` [PATCH v2 3/3] leds: trigger: audio: Remove this trigger Heiner Kallweit
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Heiner Kallweit @ 2024-03-04 20:58 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Pavel Machek, Lee Jones, Jaroslav Kysela,
	Takashi Iwai
  Cc: linux-leds@vger.kernel.org, linux-sound, linux-mips

This driver is the only one calling ledtrig_audio_set(), therefore
the LED audio trigger isn't usable standalone. So it makes sense
to fully integrate LED audio triger handling here.

The module aliases ensure that the driver is auto-loaded (if built
as module) if a LED device has one of the two audio triggers as
default trigger.

In addition disable building the old audio mute LED trigger.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
v2:
- Ensure that audio mute trigger can't be built twice.
---
 drivers/leds/trigger/Kconfig  |  7 -------
 drivers/leds/trigger/Makefile |  1 -
 sound/core/Kconfig            |  1 -
 sound/core/control_led.c      | 20 +++++++++++++++++---
 4 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/drivers/leds/trigger/Kconfig b/drivers/leds/trigger/Kconfig
index d11d80176..31576952e 100644
--- a/drivers/leds/trigger/Kconfig
+++ b/drivers/leds/trigger/Kconfig
@@ -136,13 +136,6 @@ config LEDS_TRIGGER_PATTERN
 	  which is a series of tuples, of brightness and duration (ms).
 	  If unsure, say N
 
-config LEDS_TRIGGER_AUDIO
-	tristate "Audio Mute LED Trigger"
-	help
-	  This allows LEDs to be controlled by audio drivers for following
-	  the audio mute and mic-mute changes.
-	  If unsure, say N
-
 config LEDS_TRIGGER_TTY
 	tristate "LED Trigger for TTY devices"
 	depends on TTY
diff --git a/drivers/leds/trigger/Makefile b/drivers/leds/trigger/Makefile
index 25c4db97c..242f6c4e3 100644
--- a/drivers/leds/trigger/Makefile
+++ b/drivers/leds/trigger/Makefile
@@ -14,5 +14,4 @@ obj-$(CONFIG_LEDS_TRIGGER_CAMERA)	+= ledtrig-camera.o
 obj-$(CONFIG_LEDS_TRIGGER_PANIC)	+= ledtrig-panic.o
 obj-$(CONFIG_LEDS_TRIGGER_NETDEV)	+= ledtrig-netdev.o
 obj-$(CONFIG_LEDS_TRIGGER_PATTERN)	+= ledtrig-pattern.o
-obj-$(CONFIG_LEDS_TRIGGER_AUDIO)	+= ledtrig-audio.o
 obj-$(CONFIG_LEDS_TRIGGER_TTY)		+= ledtrig-tty.o
diff --git a/sound/core/Kconfig b/sound/core/Kconfig
index 8077f481d..b970a1734 100644
--- a/sound/core/Kconfig
+++ b/sound/core/Kconfig
@@ -262,6 +262,5 @@ config SND_CTL_LED
 	tristate
 	select NEW_LEDS if SND_CTL_LED
 	select LEDS_TRIGGERS if SND_CTL_LED
-	select LEDS_TRIGGER_AUDIO if SND_CTL_LED
 
 source "sound/core/seq/Kconfig"
diff --git a/sound/core/control_led.c b/sound/core/control_led.c
index 3d37e9fa7..061a8ea23 100644
--- a/sound/core/control_led.c
+++ b/sound/core/control_led.c
@@ -53,6 +53,7 @@ struct snd_ctl_led_ctl {
 
 static DEFINE_MUTEX(snd_ctl_led_mutex);
 static bool snd_ctl_led_card_valid[SNDRV_CARDS];
+static struct led_trigger *snd_ctl_ledtrig_audio[NUM_AUDIO_LEDS];
 static struct snd_ctl_led snd_ctl_leds[MAX_LED] = {
 	{
 		.name = "speaker",
@@ -174,8 +175,11 @@ static void snd_ctl_led_set_state(struct snd_card *card, unsigned int access,
 	case MODE_FOLLOW_ROUTE:	if (route >= 0) route ^= 1; break;
 	case MODE_FOLLOW_MUTE:	/* noop */ break;
 	}
-	if (route >= 0)
-		ledtrig_audio_set(led->trigger_type, route ? LED_OFF : LED_ON);
+	if (route >= 0) {
+		struct led_trigger *trig = snd_ctl_ledtrig_audio[led->trigger_type];
+
+		led_trigger_event(trig, route ? LED_OFF : LED_ON);
+	}
 }
 
 static struct snd_ctl_led_ctl *snd_ctl_led_find(struct snd_kcontrol *kctl, unsigned int ioff)
@@ -425,8 +429,9 @@ static ssize_t brightness_show(struct device *dev,
 			       struct device_attribute *attr, char *buf)
 {
 	struct snd_ctl_led *led = container_of(dev, struct snd_ctl_led, dev);
+	struct led_trigger *trig = snd_ctl_ledtrig_audio[led->trigger_type];
 
-	return sysfs_emit(buf, "%u\n", ledtrig_audio_get(led->trigger_type));
+	return sysfs_emit(buf, "%u\n", led_trigger_get_brightness(trig));
 }
 
 static DEVICE_ATTR_RW(mode);
@@ -716,6 +721,9 @@ static int __init snd_ctl_led_init(void)
 	struct snd_ctl_led *led;
 	unsigned int group;
 
+	led_trigger_register_simple("audio-mute", &snd_ctl_ledtrig_audio[LED_AUDIO_MUTE]);
+	led_trigger_register_simple("audio-micmute", &snd_ctl_ledtrig_audio[LED_AUDIO_MICMUTE]);
+
 	device_initialize(&snd_ctl_led_dev);
 	snd_ctl_led_dev.class = &sound_class;
 	snd_ctl_led_dev.release = snd_ctl_led_dev_release;
@@ -768,7 +776,13 @@ static void __exit snd_ctl_led_exit(void)
 	}
 	device_unregister(&snd_ctl_led_dev);
 	snd_ctl_led_clean(NULL);
+
+	led_trigger_unregister_simple(snd_ctl_ledtrig_audio[LED_AUDIO_MUTE]);
+	led_trigger_unregister_simple(snd_ctl_ledtrig_audio[LED_AUDIO_MICMUTE]);
 }
 
 module_init(snd_ctl_led_init)
 module_exit(snd_ctl_led_exit)
+
+MODULE_ALIAS("ledtrig:audio-mute");
+MODULE_ALIAS("ledtrig:audio-micmute");
-- 
2.44.0



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [PATCH v2 3/3] leds: trigger: audio: Remove this trigger
  2024-03-04 20:56 [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger Heiner Kallweit
  2024-03-04 20:57 ` [PATCH v2 1/3] leds: trigger: Store brightness set by led_trigger_event() Heiner Kallweit
  2024-03-04 20:58 ` [PATCH v2 2/3] ALSA: control-led: Integrate mute led trigger Heiner Kallweit
@ 2024-03-04 20:59 ` Heiner Kallweit
  2024-03-05  9:08 ` [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger Takashi Iwai
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Heiner Kallweit @ 2024-03-04 20:59 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Pavel Machek, Lee Jones, Jaroslav Kysela,
	Takashi Iwai
  Cc: linux-leds@vger.kernel.org, linux-sound, linux-mips

Now that the audio trigger is fully integrated in
sound/core/control_led.c, we can remove it here.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 arch/mips/configs/ci20_defconfig     |  1 -
 drivers/leds/trigger/ledtrig-audio.c | 67 ----------------------------
 include/linux/leds.h                 | 14 ------
 3 files changed, 82 deletions(-)
 delete mode 100644 drivers/leds/trigger/ledtrig-audio.c

diff --git a/arch/mips/configs/ci20_defconfig b/arch/mips/configs/ci20_defconfig
index cdf2a782d..7827b2b39 100644
--- a/arch/mips/configs/ci20_defconfig
+++ b/arch/mips/configs/ci20_defconfig
@@ -152,7 +152,6 @@ CONFIG_LEDS_TRIGGER_CAMERA=m
 CONFIG_LEDS_TRIGGER_PANIC=y
 CONFIG_LEDS_TRIGGER_NETDEV=y
 CONFIG_LEDS_TRIGGER_PATTERN=y
-CONFIG_LEDS_TRIGGER_AUDIO=y
 CONFIG_RTC_CLASS=y
 CONFIG_RTC_DRV_JZ4740=y
 CONFIG_DMADEVICES=y
diff --git a/drivers/leds/trigger/ledtrig-audio.c b/drivers/leds/trigger/ledtrig-audio.c
deleted file mode 100644
index 2ecd4b760..000000000
--- a/drivers/leds/trigger/ledtrig-audio.c
+++ /dev/null
@@ -1,67 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-//
-// Audio Mute LED trigger
-//
-
-#include <linux/kernel.h>
-#include <linux/leds.h>
-#include <linux/module.h>
-#include "../leds.h"
-
-static enum led_brightness audio_state[NUM_AUDIO_LEDS];
-
-static int ledtrig_audio_mute_activate(struct led_classdev *led_cdev)
-{
-	led_set_brightness_nosleep(led_cdev, audio_state[LED_AUDIO_MUTE]);
-	return 0;
-}
-
-static int ledtrig_audio_micmute_activate(struct led_classdev *led_cdev)
-{
-	led_set_brightness_nosleep(led_cdev, audio_state[LED_AUDIO_MICMUTE]);
-	return 0;
-}
-
-static struct led_trigger ledtrig_audio[NUM_AUDIO_LEDS] = {
-	[LED_AUDIO_MUTE] = {
-		.name     = "audio-mute",
-		.activate = ledtrig_audio_mute_activate,
-	},
-	[LED_AUDIO_MICMUTE] = {
-		.name     = "audio-micmute",
-		.activate = ledtrig_audio_micmute_activate,
-	},
-};
-
-enum led_brightness ledtrig_audio_get(enum led_audio type)
-{
-	return audio_state[type];
-}
-EXPORT_SYMBOL_GPL(ledtrig_audio_get);
-
-void ledtrig_audio_set(enum led_audio type, enum led_brightness state)
-{
-	audio_state[type] = state;
-	led_trigger_event(&ledtrig_audio[type], state);
-}
-EXPORT_SYMBOL_GPL(ledtrig_audio_set);
-
-static int __init ledtrig_audio_init(void)
-{
-	led_trigger_register(&ledtrig_audio[LED_AUDIO_MUTE]);
-	led_trigger_register(&ledtrig_audio[LED_AUDIO_MICMUTE]);
-	return 0;
-}
-module_init(ledtrig_audio_init);
-
-static void __exit ledtrig_audio_exit(void)
-{
-	led_trigger_unregister(&ledtrig_audio[LED_AUDIO_MUTE]);
-	led_trigger_unregister(&ledtrig_audio[LED_AUDIO_MICMUTE]);
-}
-module_exit(ledtrig_audio_exit);
-
-MODULE_DESCRIPTION("LED trigger for audio mute control");
-MODULE_LICENSE("GPL v2");
-MODULE_ALIAS("ledtrig:audio-mute");
-MODULE_ALIAS("ledtrig:audio-micmute");
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 48fff5980..d2668b427 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -705,18 +705,4 @@ enum led_audio {
 	NUM_AUDIO_LEDS
 };
 
-#if IS_ENABLED(CONFIG_LEDS_TRIGGER_AUDIO)
-enum led_brightness ledtrig_audio_get(enum led_audio type);
-void ledtrig_audio_set(enum led_audio type, enum led_brightness state);
-#else
-static inline enum led_brightness ledtrig_audio_get(enum led_audio type)
-{
-	return LED_OFF;
-}
-static inline void ledtrig_audio_set(enum led_audio type,
-				     enum led_brightness state)
-{
-}
-#endif
-
 #endif		/* __LINUX_LEDS_H_INCLUDED */
-- 
2.44.0



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger
  2024-03-04 20:56 [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger Heiner Kallweit
                   ` (2 preceding siblings ...)
  2024-03-04 20:59 ` [PATCH v2 3/3] leds: trigger: audio: Remove this trigger Heiner Kallweit
@ 2024-03-05  9:08 ` Takashi Iwai
  2024-03-05 12:08 ` Lee Jones
  2024-04-11 15:44 ` [GIT PULL] Immutable branch between MFD, MIPS and Sound due for the v6.10 merge window Lee Jones
  5 siblings, 0 replies; 17+ messages in thread
From: Takashi Iwai @ 2024-03-05  9:08 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: Thomas Bogendoerfer, Pavel Machek, Lee Jones, Jaroslav Kysela,
	Takashi Iwai, linux-leds@vger.kernel.org, linux-sound, linux-mips

On Mon, 04 Mar 2024 21:56:29 +0100,
Heiner Kallweit wrote:
> 
> If a simple trigger is assigned to a LED, then the LED may be off until
> the next led_trigger_event() call. This may be an issue for simple
> triggers with rare led_trigger_event() calls, e.g. power supply
> charging indicators (drivers/power/supply/power_supply_leds.c).
> Therefore persist the brightness value of the last led_trigger_event()
> call and use this value if the trigger is assigned to a LED.
> This change allows to use simple triggers in more cases.
> As a first use case simplify handling of the mute audio trigger.
> 
> This series touches few subsystems. I'd propose to handle it via
> the LED subsystem.
> 
> v2:
> - Split out patch 3 from series and apply it separately via Input tree
> - Improve bisectability and ensure that audio mute trigger can't be
>   built twice between patches 2 and 4.
> 
> Heiner Kallweit (3):
>   leds: trigger: Store brightness set by led_trigger_event()
>   ALSA: control-led: Integrate mute led trigger
>   leds: trigger: audio: Remove this trigger

Reviewed-by: Takashi Iwai <tiwai@suse.de>


thanks,

Takashi

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger
  2024-03-04 20:56 [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger Heiner Kallweit
                   ` (3 preceding siblings ...)
  2024-03-05  9:08 ` [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger Takashi Iwai
@ 2024-03-05 12:08 ` Lee Jones
  2024-03-05 12:09   ` Lee Jones
  2024-04-11 15:44 ` [GIT PULL] Immutable branch between MFD, MIPS and Sound due for the v6.10 merge window Lee Jones
  5 siblings, 1 reply; 17+ messages in thread
From: Lee Jones @ 2024-03-05 12:08 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Pavel Machek, Lee Jones, Jaroslav Kysela,
	Takashi Iwai, Heiner Kallweit
  Cc: linux-leds, linux-sound, linux-mips

On Mon, 04 Mar 2024 21:56:29 +0100, Heiner Kallweit wrote:
> If a simple trigger is assigned to a LED, then the LED may be off until
> the next led_trigger_event() call. This may be an issue for simple
> triggers with rare led_trigger_event() calls, e.g. power supply
> charging indicators (drivers/power/supply/power_supply_leds.c).
> Therefore persist the brightness value of the last led_trigger_event()
> call and use this value if the trigger is assigned to a LED.
> This change allows to use simple triggers in more cases.
> As a first use case simplify handling of the mute audio trigger.
> 
> [...]

Applied, thanks!

[1/3] leds: trigger: Store brightness set by led_trigger_event()
      commit: 575129855dee0e364af7df84a77ab5cca54b1442
[2/3] ALSA: control-led: Integrate mute led trigger
      commit: ba8adb1646ee498029ac12b20e792d9d0dd17920
[3/3] leds: trigger: audio: Remove this trigger
      commit: 2c61168294d0ea42a5542dbc864afb03a76bbc11

--
Lee Jones [李琼斯]


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger
  2024-03-05 12:08 ` Lee Jones
@ 2024-03-05 12:09   ` Lee Jones
  2024-03-05 14:54     ` Lee Jones
  2024-03-28 10:42     ` Lee Jones
  0 siblings, 2 replies; 17+ messages in thread
From: Lee Jones @ 2024-03-05 12:09 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Pavel Machek, Jaroslav Kysela, Takashi Iwai,
	Heiner Kallweit
  Cc: linux-leds, linux-sound, linux-mips

On Tue, 05 Mar 2024, Lee Jones wrote:

> On Mon, 04 Mar 2024 21:56:29 +0100, Heiner Kallweit wrote:
> > If a simple trigger is assigned to a LED, then the LED may be off until
> > the next led_trigger_event() call. This may be an issue for simple
> > triggers with rare led_trigger_event() calls, e.g. power supply
> > charging indicators (drivers/power/supply/power_supply_leds.c).
> > Therefore persist the brightness value of the last led_trigger_event()
> > call and use this value if the trigger is assigned to a LED.
> > This change allows to use simple triggers in more cases.
> > As a first use case simplify handling of the mute audio trigger.
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/3] leds: trigger: Store brightness set by led_trigger_event()
>       commit: 575129855dee0e364af7df84a77ab5cca54b1442
> [2/3] ALSA: control-led: Integrate mute led trigger
>       commit: ba8adb1646ee498029ac12b20e792d9d0dd17920
> [3/3] leds: trigger: audio: Remove this trigger
>       commit: 2c61168294d0ea42a5542dbc864afb03a76bbc11

Submitted for build testing.

Once succeeded, a PR will follow for other maintainers to pull from.

-- 
Lee Jones [李琼斯]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger
  2024-03-05 12:09   ` Lee Jones
@ 2024-03-05 14:54     ` Lee Jones
  2024-03-05 15:56       ` Heiner Kallweit
  2024-03-28 10:42     ` Lee Jones
  1 sibling, 1 reply; 17+ messages in thread
From: Lee Jones @ 2024-03-05 14:54 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Pavel Machek, Jaroslav Kysela, Takashi Iwai,
	Heiner Kallweit
  Cc: linux-leds, linux-sound, linux-mips

On Tue, 05 Mar 2024, Lee Jones wrote:

> On Tue, 05 Mar 2024, Lee Jones wrote:
> 
> > On Mon, 04 Mar 2024 21:56:29 +0100, Heiner Kallweit wrote:
> > > If a simple trigger is assigned to a LED, then the LED may be off until
> > > the next led_trigger_event() call. This may be an issue for simple
> > > triggers with rare led_trigger_event() calls, e.g. power supply
> > > charging indicators (drivers/power/supply/power_supply_leds.c).
> > > Therefore persist the brightness value of the last led_trigger_event()
> > > call and use this value if the trigger is assigned to a LED.
> > > This change allows to use simple triggers in more cases.
> > > As a first use case simplify handling of the mute audio trigger.
> > > 
> > > [...]
> > 
> > Applied, thanks!
> > 
> > [1/3] leds: trigger: Store brightness set by led_trigger_event()
> >       commit: 575129855dee0e364af7df84a77ab5cca54b1442
> > [2/3] ALSA: control-led: Integrate mute led trigger
> >       commit: ba8adb1646ee498029ac12b20e792d9d0dd17920
> > [3/3] leds: trigger: audio: Remove this trigger
> >       commit: 2c61168294d0ea42a5542dbc864afb03a76bbc11
> 
> Submitted for build testing.
> 
> Once succeeded, a PR will follow for other maintainers to pull from.

make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc' 'HOSTCC=sccache gcc' allmodconfig
make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc' 'HOSTCC=sccache gcc'
x86_64-linux-gnu-ld: warning: arch/x86/entry/vdso/vclock_gettime-x32.o: corrupt GNU_PROPERTY_TYPE (5) size: 0x10
x86_64-linux-gnu-ld: warning: arch/x86/entry/vdso/vgetcpu-x32.o: corrupt GNU_PROPERTY_TYPE (5) size: 0x10
/builds/linux/drivers/platform/x86/dell/dell-laptop.c: In function 'dell_init':
/builds/linux/drivers/platform/x86/dell/dell-laptop.c:2255:33: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
   micmute_led_cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
                                 ^~~~~~~~~~~~~~~~~
                                 led_trigger_set
cc1: all warnings being treated as errors
make[7]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/dell/dell-laptop.o] Error 1
make[7]: Target 'drivers/platform/x86/dell/' not remade because of errors.
make[6]: *** [/builds/linux/scripts/Makefile.build:481: drivers/platform/x86/dell] Error 2
/builds/linux/drivers/platform/x86/huawei-wmi.c: In function 'huawei_wmi_leds_setup':
/builds/linux/drivers/platform/x86/huawei-wmi.c:313:28: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
  huawei->cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
                            ^~~~~~~~~~~~~~~~~
                            led_trigger_set
cc1: all warnings being treated as errors
make[6]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/huawei-wmi.o] Error 1
/builds/linux/drivers/platform/x86/asus-wmi.c: In function 'asus_wmi_led_init':
/builds/linux/drivers/platform/x86/asus-wmi.c:1623:34: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
   asus->micmute_led.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
                                  ^~~~~~~~~~~~~~~~~
                                  led_trigger_set
cc1: all warnings being treated as errors
make[6]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/asus-wmi.o] Error 1
/builds/linux/drivers/platform/x86/thinkpad_acpi.c: In function 'mute_led_init':
/builds/linux/drivers/platform/x86/thinkpad_acpi.c:9288:33: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
   mute_led_cdev[i].brightness = ledtrig_audio_get(i);
                                 ^~~~~~~~~~~~~~~~~
                                 led_trigger_set

############################3

Errors were caused
 
[v6.8-rc1] ib-leds-mips-sound-6.9 2c61168294d0e ("leds: trigger: audio: Remove this trigger")

 x86_64 allmodconfig gcc-8
     https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtQpYDimIIpMqO0Qm4AMAAPU/ 	Pass (0 errors - 2 warnings) : v6.8-rc1
     https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhvxgZA6moBZmToTavyY4Eita/ 	Fail (7 errors - 2 warnings) : ib-leds-mips-sound-6.9 

 x86_64 allmodconfig gcc-9
     https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtYCYEqxnUFmoH73iKlcEIV8/ 	Pass (0 errors - 0 warnings) : v6.8-rc1
     https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhw2i4B539YZXCoSN2LSRvsW8/ 	Fail (7 errors - 0 warnings) : ib-leds-mips-sound-6.9 

 x86_64 allyesconfig gcc-8
     https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtTzCsCxRpl9loRyfPrD1uhR/ 	Pass (0 errors - 2 warnings) : v6.8-rc1
     https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhw1WQ2BIpJRoyK7ruVCtihSN/ 	Fail (7 errors - 2 warnings) : ib-leds-mips-sound-6.9

-- 
Lee Jones [李琼斯]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger
  2024-03-05 14:54     ` Lee Jones
@ 2024-03-05 15:56       ` Heiner Kallweit
  2024-03-05 16:06         ` Lee Jones
  0 siblings, 1 reply; 17+ messages in thread
From: Heiner Kallweit @ 2024-03-05 15:56 UTC (permalink / raw)
  To: Lee Jones, Thomas Bogendoerfer, Pavel Machek, Jaroslav Kysela,
	Takashi Iwai
  Cc: linux-leds, linux-sound, linux-mips

On 05.03.2024 15:54, Lee Jones wrote:
> On Tue, 05 Mar 2024, Lee Jones wrote:
> 
>> On Tue, 05 Mar 2024, Lee Jones wrote:
>>
>>> On Mon, 04 Mar 2024 21:56:29 +0100, Heiner Kallweit wrote:
>>>> If a simple trigger is assigned to a LED, then the LED may be off until
>>>> the next led_trigger_event() call. This may be an issue for simple
>>>> triggers with rare led_trigger_event() calls, e.g. power supply
>>>> charging indicators (drivers/power/supply/power_supply_leds.c).
>>>> Therefore persist the brightness value of the last led_trigger_event()
>>>> call and use this value if the trigger is assigned to a LED.
>>>> This change allows to use simple triggers in more cases.
>>>> As a first use case simplify handling of the mute audio trigger.
>>>>
>>>> [...]
>>>
>>> Applied, thanks!
>>>
>>> [1/3] leds: trigger: Store brightness set by led_trigger_event()
>>>       commit: 575129855dee0e364af7df84a77ab5cca54b1442
>>> [2/3] ALSA: control-led: Integrate mute led trigger
>>>       commit: ba8adb1646ee498029ac12b20e792d9d0dd17920
>>> [3/3] leds: trigger: audio: Remove this trigger
>>>       commit: 2c61168294d0ea42a5542dbc864afb03a76bbc11
>>
>> Submitted for build testing.
>>
>> Once succeeded, a PR will follow for other maintainers to pull from.
> 
> make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc' 'HOSTCC=sccache gcc' allmodconfig
> make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc' 'HOSTCC=sccache gcc'
> x86_64-linux-gnu-ld: warning: arch/x86/entry/vdso/vclock_gettime-x32.o: corrupt GNU_PROPERTY_TYPE (5) size: 0x10
> x86_64-linux-gnu-ld: warning: arch/x86/entry/vdso/vgetcpu-x32.o: corrupt GNU_PROPERTY_TYPE (5) size: 0x10
> /builds/linux/drivers/platform/x86/dell/dell-laptop.c: In function 'dell_init':
> /builds/linux/drivers/platform/x86/dell/dell-laptop.c:2255:33: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
>    micmute_led_cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
>                                  ^~~~~~~~~~~~~~~~~
>                                  led_trigger_set
> cc1: all warnings being treated as errors
> make[7]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/dell/dell-laptop.o] Error 1
> make[7]: Target 'drivers/platform/x86/dell/' not remade because of errors.
> make[6]: *** [/builds/linux/scripts/Makefile.build:481: drivers/platform/x86/dell] Error 2
> /builds/linux/drivers/platform/x86/huawei-wmi.c: In function 'huawei_wmi_leds_setup':
> /builds/linux/drivers/platform/x86/huawei-wmi.c:313:28: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
>   huawei->cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
>                             ^~~~~~~~~~~~~~~~~
>                             led_trigger_set
> cc1: all warnings being treated as errors
> make[6]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/huawei-wmi.o] Error 1
> /builds/linux/drivers/platform/x86/asus-wmi.c: In function 'asus_wmi_led_init':
> /builds/linux/drivers/platform/x86/asus-wmi.c:1623:34: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
>    asus->micmute_led.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
>                                   ^~~~~~~~~~~~~~~~~
>                                   led_trigger_set
> cc1: all warnings being treated as errors
> make[6]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/asus-wmi.o] Error 1
> /builds/linux/drivers/platform/x86/thinkpad_acpi.c: In function 'mute_led_init':
> /builds/linux/drivers/platform/x86/thinkpad_acpi.c:9288:33: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
>    mute_led_cdev[i].brightness = ledtrig_audio_get(i);
>                                  ^~~~~~~~~~~~~~~~~
>                                  led_trigger_set
> 
> ############################3
> 
> Errors were caused
>  
> [v6.8-rc1] ib-leds-mips-sound-6.9 2c61168294d0e ("leds: trigger: audio: Remove this trigger")
> 
>  x86_64 allmodconfig gcc-8
>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtQpYDimIIpMqO0Qm4AMAAPU/ 	Pass (0 errors - 2 warnings) : v6.8-rc1
>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhvxgZA6moBZmToTavyY4Eita/ 	Fail (7 errors - 2 warnings) : ib-leds-mips-sound-6.9 
> 
>  x86_64 allmodconfig gcc-9
>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtYCYEqxnUFmoH73iKlcEIV8/ 	Pass (0 errors - 0 warnings) : v6.8-rc1
>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhw2i4B539YZXCoSN2LSRvsW8/ 	Fail (7 errors - 0 warnings) : ib-leds-mips-sound-6.9 
> 
>  x86_64 allyesconfig gcc-8
>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtTzCsCxRpl9loRyfPrD1uhR/ 	Pass (0 errors - 2 warnings) : v6.8-rc1
>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhw1WQ2BIpJRoyK7ruVCtihSN/ 	Fail (7 errors - 2 warnings) : ib-leds-mips-sound-6.9
> 

Right, I forgot, there are patches applied via a different tree end of January,
that this series depends on. I assume this means that the series can be applied
only after the merge window.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger
  2024-03-05 15:56       ` Heiner Kallweit
@ 2024-03-05 16:06         ` Lee Jones
  2024-03-08 17:30           ` Heiner Kallweit
  2024-03-27 12:08           ` Heiner Kallweit
  0 siblings, 2 replies; 17+ messages in thread
From: Lee Jones @ 2024-03-05 16:06 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: Thomas Bogendoerfer, Pavel Machek, Jaroslav Kysela, Takashi Iwai,
	linux-leds, linux-sound, linux-mips

On Tue, 05 Mar 2024, Heiner Kallweit wrote:

> On 05.03.2024 15:54, Lee Jones wrote:
> > On Tue, 05 Mar 2024, Lee Jones wrote:
> > 
> >> On Tue, 05 Mar 2024, Lee Jones wrote:
> >>
> >>> On Mon, 04 Mar 2024 21:56:29 +0100, Heiner Kallweit wrote:
> >>>> If a simple trigger is assigned to a LED, then the LED may be off until
> >>>> the next led_trigger_event() call. This may be an issue for simple
> >>>> triggers with rare led_trigger_event() calls, e.g. power supply
> >>>> charging indicators (drivers/power/supply/power_supply_leds.c).
> >>>> Therefore persist the brightness value of the last led_trigger_event()
> >>>> call and use this value if the trigger is assigned to a LED.
> >>>> This change allows to use simple triggers in more cases.
> >>>> As a first use case simplify handling of the mute audio trigger.
> >>>>
> >>>> [...]
> >>>
> >>> Applied, thanks!
> >>>
> >>> [1/3] leds: trigger: Store brightness set by led_trigger_event()
> >>>       commit: 575129855dee0e364af7df84a77ab5cca54b1442
> >>> [2/3] ALSA: control-led: Integrate mute led trigger
> >>>       commit: ba8adb1646ee498029ac12b20e792d9d0dd17920
> >>> [3/3] leds: trigger: audio: Remove this trigger
> >>>       commit: 2c61168294d0ea42a5542dbc864afb03a76bbc11
> >>
> >> Submitted for build testing.
> >>
> >> Once succeeded, a PR will follow for other maintainers to pull from.
> > 
> > make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc' 'HOSTCC=sccache gcc' allmodconfig
> > make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc' 'HOSTCC=sccache gcc'
> > x86_64-linux-gnu-ld: warning: arch/x86/entry/vdso/vclock_gettime-x32.o: corrupt GNU_PROPERTY_TYPE (5) size: 0x10
> > x86_64-linux-gnu-ld: warning: arch/x86/entry/vdso/vgetcpu-x32.o: corrupt GNU_PROPERTY_TYPE (5) size: 0x10
> > /builds/linux/drivers/platform/x86/dell/dell-laptop.c: In function 'dell_init':
> > /builds/linux/drivers/platform/x86/dell/dell-laptop.c:2255:33: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
> >    micmute_led_cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
> >                                  ^~~~~~~~~~~~~~~~~
> >                                  led_trigger_set
> > cc1: all warnings being treated as errors
> > make[7]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/dell/dell-laptop.o] Error 1
> > make[7]: Target 'drivers/platform/x86/dell/' not remade because of errors.
> > make[6]: *** [/builds/linux/scripts/Makefile.build:481: drivers/platform/x86/dell] Error 2
> > /builds/linux/drivers/platform/x86/huawei-wmi.c: In function 'huawei_wmi_leds_setup':
> > /builds/linux/drivers/platform/x86/huawei-wmi.c:313:28: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
> >   huawei->cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
> >                             ^~~~~~~~~~~~~~~~~
> >                             led_trigger_set
> > cc1: all warnings being treated as errors
> > make[6]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/huawei-wmi.o] Error 1
> > /builds/linux/drivers/platform/x86/asus-wmi.c: In function 'asus_wmi_led_init':
> > /builds/linux/drivers/platform/x86/asus-wmi.c:1623:34: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
> >    asus->micmute_led.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
> >                                   ^~~~~~~~~~~~~~~~~
> >                                   led_trigger_set
> > cc1: all warnings being treated as errors
> > make[6]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/asus-wmi.o] Error 1
> > /builds/linux/drivers/platform/x86/thinkpad_acpi.c: In function 'mute_led_init':
> > /builds/linux/drivers/platform/x86/thinkpad_acpi.c:9288:33: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
> >    mute_led_cdev[i].brightness = ledtrig_audio_get(i);
> >                                  ^~~~~~~~~~~~~~~~~
> >                                  led_trigger_set
> > 
> > ############################3
> > 
> > Errors were caused
> >  
> > [v6.8-rc1] ib-leds-mips-sound-6.9 2c61168294d0e ("leds: trigger: audio: Remove this trigger")
> > 
> >  x86_64 allmodconfig gcc-8
> >      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtQpYDimIIpMqO0Qm4AMAAPU/ 	Pass (0 errors - 2 warnings) : v6.8-rc1
> >      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhvxgZA6moBZmToTavyY4Eita/ 	Fail (7 errors - 2 warnings) : ib-leds-mips-sound-6.9 
> > 
> >  x86_64 allmodconfig gcc-9
> >      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtYCYEqxnUFmoH73iKlcEIV8/ 	Pass (0 errors - 0 warnings) : v6.8-rc1
> >      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhw2i4B539YZXCoSN2LSRvsW8/ 	Fail (7 errors - 0 warnings) : ib-leds-mips-sound-6.9 
> > 
> >  x86_64 allyesconfig gcc-8
> >      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtTzCsCxRpl9loRyfPrD1uhR/ 	Pass (0 errors - 2 warnings) : v6.8-rc1
> >      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhw1WQ2BIpJRoyK7ruVCtihSN/ 	Fail (7 errors - 2 warnings) : ib-leds-mips-sound-6.9
> > 
> 
> Right, I forgot, there are patches applied via a different tree end of January,
> that this series depends on. I assume this means that the series can be applied
> only after the merge window.

Yes, unless there is a succinct immutable branch I can pull from.

-- 
Lee Jones [李琼斯]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger
  2024-03-05 16:06         ` Lee Jones
@ 2024-03-08 17:30           ` Heiner Kallweit
  2024-03-27 12:08           ` Heiner Kallweit
  1 sibling, 0 replies; 17+ messages in thread
From: Heiner Kallweit @ 2024-03-08 17:30 UTC (permalink / raw)
  To: Lee Jones
  Cc: Thomas Bogendoerfer, Pavel Machek, Jaroslav Kysela, Takashi Iwai,
	linux-leds, linux-sound, linux-mips

On 05.03.2024 17:06, Lee Jones wrote:
> On Tue, 05 Mar 2024, Heiner Kallweit wrote:
> 
>> On 05.03.2024 15:54, Lee Jones wrote:
>>> On Tue, 05 Mar 2024, Lee Jones wrote:
>>>
>>>> On Tue, 05 Mar 2024, Lee Jones wrote:
>>>>
>>>>> On Mon, 04 Mar 2024 21:56:29 +0100, Heiner Kallweit wrote:
>>>>>> If a simple trigger is assigned to a LED, then the LED may be off until
>>>>>> the next led_trigger_event() call. This may be an issue for simple
>>>>>> triggers with rare led_trigger_event() calls, e.g. power supply
>>>>>> charging indicators (drivers/power/supply/power_supply_leds.c).
>>>>>> Therefore persist the brightness value of the last led_trigger_event()
>>>>>> call and use this value if the trigger is assigned to a LED.
>>>>>> This change allows to use simple triggers in more cases.
>>>>>> As a first use case simplify handling of the mute audio trigger.
>>>>>>
>>>>>> [...]
>>>>>
>>>>> Applied, thanks!
>>>>>
>>>>> [1/3] leds: trigger: Store brightness set by led_trigger_event()
>>>>>       commit: 575129855dee0e364af7df84a77ab5cca54b1442
>>>>> [2/3] ALSA: control-led: Integrate mute led trigger
>>>>>       commit: ba8adb1646ee498029ac12b20e792d9d0dd17920
>>>>> [3/3] leds: trigger: audio: Remove this trigger
>>>>>       commit: 2c61168294d0ea42a5542dbc864afb03a76bbc11
>>>>
>>>> Submitted for build testing.
>>>>
>>>> Once succeeded, a PR will follow for other maintainers to pull from.
>>>
>>> make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc' 'HOSTCC=sccache gcc' allmodconfig
>>> make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc' 'HOSTCC=sccache gcc'
>>> x86_64-linux-gnu-ld: warning: arch/x86/entry/vdso/vclock_gettime-x32.o: corrupt GNU_PROPERTY_TYPE (5) size: 0x10
>>> x86_64-linux-gnu-ld: warning: arch/x86/entry/vdso/vgetcpu-x32.o: corrupt GNU_PROPERTY_TYPE (5) size: 0x10
>>> /builds/linux/drivers/platform/x86/dell/dell-laptop.c: In function 'dell_init':
>>> /builds/linux/drivers/platform/x86/dell/dell-laptop.c:2255:33: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
>>>    micmute_led_cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
>>>                                  ^~~~~~~~~~~~~~~~~
>>>                                  led_trigger_set
>>> cc1: all warnings being treated as errors
>>> make[7]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/dell/dell-laptop.o] Error 1
>>> make[7]: Target 'drivers/platform/x86/dell/' not remade because of errors.
>>> make[6]: *** [/builds/linux/scripts/Makefile.build:481: drivers/platform/x86/dell] Error 2
>>> /builds/linux/drivers/platform/x86/huawei-wmi.c: In function 'huawei_wmi_leds_setup':
>>> /builds/linux/drivers/platform/x86/huawei-wmi.c:313:28: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
>>>   huawei->cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
>>>                             ^~~~~~~~~~~~~~~~~
>>>                             led_trigger_set
>>> cc1: all warnings being treated as errors
>>> make[6]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/huawei-wmi.o] Error 1
>>> /builds/linux/drivers/platform/x86/asus-wmi.c: In function 'asus_wmi_led_init':
>>> /builds/linux/drivers/platform/x86/asus-wmi.c:1623:34: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
>>>    asus->micmute_led.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
>>>                                   ^~~~~~~~~~~~~~~~~
>>>                                   led_trigger_set
>>> cc1: all warnings being treated as errors
>>> make[6]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/asus-wmi.o] Error 1
>>> /builds/linux/drivers/platform/x86/thinkpad_acpi.c: In function 'mute_led_init':
>>> /builds/linux/drivers/platform/x86/thinkpad_acpi.c:9288:33: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
>>>    mute_led_cdev[i].brightness = ledtrig_audio_get(i);
>>>                                  ^~~~~~~~~~~~~~~~~
>>>                                  led_trigger_set
>>>
>>> ############################3
>>>
>>> Errors were caused
>>>  
>>> [v6.8-rc1] ib-leds-mips-sound-6.9 2c61168294d0e ("leds: trigger: audio: Remove this trigger")
>>>
>>>  x86_64 allmodconfig gcc-8
>>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtQpYDimIIpMqO0Qm4AMAAPU/ 	Pass (0 errors - 2 warnings) : v6.8-rc1
>>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhvxgZA6moBZmToTavyY4Eita/ 	Fail (7 errors - 2 warnings) : ib-leds-mips-sound-6.9 
>>>
>>>  x86_64 allmodconfig gcc-9
>>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtYCYEqxnUFmoH73iKlcEIV8/ 	Pass (0 errors - 0 warnings) : v6.8-rc1
>>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhw2i4B539YZXCoSN2LSRvsW8/ 	Fail (7 errors - 0 warnings) : ib-leds-mips-sound-6.9 
>>>
>>>  x86_64 allyesconfig gcc-8
>>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtTzCsCxRpl9loRyfPrD1uhR/ 	Pass (0 errors - 2 warnings) : v6.8-rc1
>>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhw1WQ2BIpJRoyK7ruVCtihSN/ 	Fail (7 errors - 2 warnings) : ib-leds-mips-sound-6.9
>>>
>>
>> Right, I forgot, there are patches applied via a different tree end of January,
>> that this series depends on. I assume this means that the series can be applied
>> only after the merge window.
> 
> Yes, unless there is a succinct immutable branch I can pull from.
> 
I'm not aware of such a branch. 6.9-rc1 isn't too far away, so let's wait for it.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger
  2024-03-05 16:06         ` Lee Jones
  2024-03-08 17:30           ` Heiner Kallweit
@ 2024-03-27 12:08           ` Heiner Kallweit
  2024-03-27 13:14             ` Lee Jones
  1 sibling, 1 reply; 17+ messages in thread
From: Heiner Kallweit @ 2024-03-27 12:08 UTC (permalink / raw)
  To: Lee Jones
  Cc: Thomas Bogendoerfer, Pavel Machek, Jaroslav Kysela, Takashi Iwai,
	linux-leds, linux-sound, linux-mips

On 05.03.2024 17:06, Lee Jones wrote:
> On Tue, 05 Mar 2024, Heiner Kallweit wrote:
> 
>> On 05.03.2024 15:54, Lee Jones wrote:
>>> On Tue, 05 Mar 2024, Lee Jones wrote:
>>>
>>>> On Tue, 05 Mar 2024, Lee Jones wrote:
>>>>
>>>>> On Mon, 04 Mar 2024 21:56:29 +0100, Heiner Kallweit wrote:
>>>>>> If a simple trigger is assigned to a LED, then the LED may be off until
>>>>>> the next led_trigger_event() call. This may be an issue for simple
>>>>>> triggers with rare led_trigger_event() calls, e.g. power supply
>>>>>> charging indicators (drivers/power/supply/power_supply_leds.c).
>>>>>> Therefore persist the brightness value of the last led_trigger_event()
>>>>>> call and use this value if the trigger is assigned to a LED.
>>>>>> This change allows to use simple triggers in more cases.
>>>>>> As a first use case simplify handling of the mute audio trigger.
>>>>>>
>>>>>> [...]
>>>>>
>>>>> Applied, thanks!
>>>>>
>>>>> [1/3] leds: trigger: Store brightness set by led_trigger_event()
>>>>>       commit: 575129855dee0e364af7df84a77ab5cca54b1442
>>>>> [2/3] ALSA: control-led: Integrate mute led trigger
>>>>>       commit: ba8adb1646ee498029ac12b20e792d9d0dd17920
>>>>> [3/3] leds: trigger: audio: Remove this trigger
>>>>>       commit: 2c61168294d0ea42a5542dbc864afb03a76bbc11
>>>>
>>>> Submitted for build testing.
>>>>
>>>> Once succeeded, a PR will follow for other maintainers to pull from.
>>>
>>> make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc' 'HOSTCC=sccache gcc' allmodconfig
>>> make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc' 'HOSTCC=sccache gcc'
>>> x86_64-linux-gnu-ld: warning: arch/x86/entry/vdso/vclock_gettime-x32.o: corrupt GNU_PROPERTY_TYPE (5) size: 0x10
>>> x86_64-linux-gnu-ld: warning: arch/x86/entry/vdso/vgetcpu-x32.o: corrupt GNU_PROPERTY_TYPE (5) size: 0x10
>>> /builds/linux/drivers/platform/x86/dell/dell-laptop.c: In function 'dell_init':
>>> /builds/linux/drivers/platform/x86/dell/dell-laptop.c:2255:33: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
>>>    micmute_led_cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
>>>                                  ^~~~~~~~~~~~~~~~~
>>>                                  led_trigger_set
>>> cc1: all warnings being treated as errors
>>> make[7]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/dell/dell-laptop.o] Error 1
>>> make[7]: Target 'drivers/platform/x86/dell/' not remade because of errors.
>>> make[6]: *** [/builds/linux/scripts/Makefile.build:481: drivers/platform/x86/dell] Error 2
>>> /builds/linux/drivers/platform/x86/huawei-wmi.c: In function 'huawei_wmi_leds_setup':
>>> /builds/linux/drivers/platform/x86/huawei-wmi.c:313:28: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
>>>   huawei->cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
>>>                             ^~~~~~~~~~~~~~~~~
>>>                             led_trigger_set
>>> cc1: all warnings being treated as errors
>>> make[6]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/huawei-wmi.o] Error 1
>>> /builds/linux/drivers/platform/x86/asus-wmi.c: In function 'asus_wmi_led_init':
>>> /builds/linux/drivers/platform/x86/asus-wmi.c:1623:34: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
>>>    asus->micmute_led.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
>>>                                   ^~~~~~~~~~~~~~~~~
>>>                                   led_trigger_set
>>> cc1: all warnings being treated as errors
>>> make[6]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/asus-wmi.o] Error 1
>>> /builds/linux/drivers/platform/x86/thinkpad_acpi.c: In function 'mute_led_init':
>>> /builds/linux/drivers/platform/x86/thinkpad_acpi.c:9288:33: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
>>>    mute_led_cdev[i].brightness = ledtrig_audio_get(i);
>>>                                  ^~~~~~~~~~~~~~~~~
>>>                                  led_trigger_set
>>>
>>> ############################3
>>>
>>> Errors were caused
>>>  
>>> [v6.8-rc1] ib-leds-mips-sound-6.9 2c61168294d0e ("leds: trigger: audio: Remove this trigger")
>>>
>>>  x86_64 allmodconfig gcc-8
>>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtQpYDimIIpMqO0Qm4AMAAPU/ 	Pass (0 errors - 2 warnings) : v6.8-rc1
>>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhvxgZA6moBZmToTavyY4Eita/ 	Fail (7 errors - 2 warnings) : ib-leds-mips-sound-6.9 
>>>
>>>  x86_64 allmodconfig gcc-9
>>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtYCYEqxnUFmoH73iKlcEIV8/ 	Pass (0 errors - 0 warnings) : v6.8-rc1
>>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhw2i4B539YZXCoSN2LSRvsW8/ 	Fail (7 errors - 0 warnings) : ib-leds-mips-sound-6.9 
>>>
>>>  x86_64 allyesconfig gcc-8
>>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtTzCsCxRpl9loRyfPrD1uhR/ 	Pass (0 errors - 2 warnings) : v6.8-rc1
>>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhw1WQ2BIpJRoyK7ruVCtihSN/ 	Fail (7 errors - 2 warnings) : ib-leds-mips-sound-6.9
>>>
>>
>> Right, I forgot, there are patches applied via a different tree end of January,
>> that this series depends on. I assume this means that the series can be applied
>> only after the merge window.
> 
> Yes, unless there is a succinct immutable branch I can pull from.
> 
Now that 6.9-rc1 is out, can this series be applied?


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger
  2024-03-27 12:08           ` Heiner Kallweit
@ 2024-03-27 13:14             ` Lee Jones
  0 siblings, 0 replies; 17+ messages in thread
From: Lee Jones @ 2024-03-27 13:14 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: Thomas Bogendoerfer, Pavel Machek, Jaroslav Kysela, Takashi Iwai,
	linux-leds, linux-sound, linux-mips

On Wed, 27 Mar 2024, Heiner Kallweit wrote:

> On 05.03.2024 17:06, Lee Jones wrote:
> > On Tue, 05 Mar 2024, Heiner Kallweit wrote:
> > 
> >> On 05.03.2024 15:54, Lee Jones wrote:
> >>> On Tue, 05 Mar 2024, Lee Jones wrote:
> >>>
> >>>> On Tue, 05 Mar 2024, Lee Jones wrote:
> >>>>
> >>>>> On Mon, 04 Mar 2024 21:56:29 +0100, Heiner Kallweit wrote:
> >>>>>> If a simple trigger is assigned to a LED, then the LED may be off until
> >>>>>> the next led_trigger_event() call. This may be an issue for simple
> >>>>>> triggers with rare led_trigger_event() calls, e.g. power supply
> >>>>>> charging indicators (drivers/power/supply/power_supply_leds.c).
> >>>>>> Therefore persist the brightness value of the last led_trigger_event()
> >>>>>> call and use this value if the trigger is assigned to a LED.
> >>>>>> This change allows to use simple triggers in more cases.
> >>>>>> As a first use case simplify handling of the mute audio trigger.
> >>>>>>
> >>>>>> [...]
> >>>>>
> >>>>> Applied, thanks!
> >>>>>
> >>>>> [1/3] leds: trigger: Store brightness set by led_trigger_event()
> >>>>>       commit: 575129855dee0e364af7df84a77ab5cca54b1442
> >>>>> [2/3] ALSA: control-led: Integrate mute led trigger
> >>>>>       commit: ba8adb1646ee498029ac12b20e792d9d0dd17920
> >>>>> [3/3] leds: trigger: audio: Remove this trigger
> >>>>>       commit: 2c61168294d0ea42a5542dbc864afb03a76bbc11
> >>>>
> >>>> Submitted for build testing.
> >>>>
> >>>> Once succeeded, a PR will follow for other maintainers to pull from.
> >>>
> >>> make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc' 'HOSTCC=sccache gcc' allmodconfig
> >>> make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/build ARCH=x86_64 SRCARCH=x86 CROSS_COMPILE=x86_64-linux-gnu- 'CC=sccache x86_64-linux-gnu-gcc' 'HOSTCC=sccache gcc'
> >>> x86_64-linux-gnu-ld: warning: arch/x86/entry/vdso/vclock_gettime-x32.o: corrupt GNU_PROPERTY_TYPE (5) size: 0x10
> >>> x86_64-linux-gnu-ld: warning: arch/x86/entry/vdso/vgetcpu-x32.o: corrupt GNU_PROPERTY_TYPE (5) size: 0x10
> >>> /builds/linux/drivers/platform/x86/dell/dell-laptop.c: In function 'dell_init':
> >>> /builds/linux/drivers/platform/x86/dell/dell-laptop.c:2255:33: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
> >>>    micmute_led_cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
> >>>                                  ^~~~~~~~~~~~~~~~~
> >>>                                  led_trigger_set
> >>> cc1: all warnings being treated as errors
> >>> make[7]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/dell/dell-laptop.o] Error 1
> >>> make[7]: Target 'drivers/platform/x86/dell/' not remade because of errors.
> >>> make[6]: *** [/builds/linux/scripts/Makefile.build:481: drivers/platform/x86/dell] Error 2
> >>> /builds/linux/drivers/platform/x86/huawei-wmi.c: In function 'huawei_wmi_leds_setup':
> >>> /builds/linux/drivers/platform/x86/huawei-wmi.c:313:28: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
> >>>   huawei->cdev.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
> >>>                             ^~~~~~~~~~~~~~~~~
> >>>                             led_trigger_set
> >>> cc1: all warnings being treated as errors
> >>> make[6]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/huawei-wmi.o] Error 1
> >>> /builds/linux/drivers/platform/x86/asus-wmi.c: In function 'asus_wmi_led_init':
> >>> /builds/linux/drivers/platform/x86/asus-wmi.c:1623:34: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
> >>>    asus->micmute_led.brightness = ledtrig_audio_get(LED_AUDIO_MICMUTE);
> >>>                                   ^~~~~~~~~~~~~~~~~
> >>>                                   led_trigger_set
> >>> cc1: all warnings being treated as errors
> >>> make[6]: *** [/builds/linux/scripts/Makefile.build:243: drivers/platform/x86/asus-wmi.o] Error 1
> >>> /builds/linux/drivers/platform/x86/thinkpad_acpi.c: In function 'mute_led_init':
> >>> /builds/linux/drivers/platform/x86/thinkpad_acpi.c:9288:33: error: implicit declaration of function 'ledtrig_audio_get'; did you mean 'led_trigger_set'? [-Werror=implicit-function-declaration]
> >>>    mute_led_cdev[i].brightness = ledtrig_audio_get(i);
> >>>                                  ^~~~~~~~~~~~~~~~~
> >>>                                  led_trigger_set
> >>>
> >>> ############################3
> >>>
> >>> Errors were caused
> >>>  
> >>> [v6.8-rc1] ib-leds-mips-sound-6.9 2c61168294d0e ("leds: trigger: audio: Remove this trigger")
> >>>
> >>>  x86_64 allmodconfig gcc-8
> >>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtQpYDimIIpMqO0Qm4AMAAPU/ 	Pass (0 errors - 2 warnings) : v6.8-rc1
> >>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhvxgZA6moBZmToTavyY4Eita/ 	Fail (7 errors - 2 warnings) : ib-leds-mips-sound-6.9 
> >>>
> >>>  x86_64 allmodconfig gcc-9
> >>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtYCYEqxnUFmoH73iKlcEIV8/ 	Pass (0 errors - 0 warnings) : v6.8-rc1
> >>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhw2i4B539YZXCoSN2LSRvsW8/ 	Fail (7 errors - 0 warnings) : ib-leds-mips-sound-6.9 
> >>>
> >>>  x86_64 allyesconfig gcc-8
> >>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhtTzCsCxRpl9loRyfPrD1uhR/ 	Pass (0 errors - 2 warnings) : v6.8-rc1
> >>>      https://storage.tuxsuite.com/public/google/lee.jones/builds/2dGhw1WQ2BIpJRoyK7ruVCtihSN/ 	Fail (7 errors - 2 warnings) : ib-leds-mips-sound-6.9
> >>>
> >>
> >> Right, I forgot, there are patches applied via a different tree end of January,
> >> that this series depends on. I assume this means that the series can be applied
> >> only after the merge window.
> > 
> > Yes, unless there is a succinct immutable branch I can pull from.
> > 
> Now that 6.9-rc1 is out, can this series be applied?

Catching up with upstream reviews in on my TODO list.

-- 
Lee Jones [李琼斯]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger
  2024-03-05 12:09   ` Lee Jones
  2024-03-05 14:54     ` Lee Jones
@ 2024-03-28 10:42     ` Lee Jones
  2024-04-05  9:22       ` Heiner Kallweit
  1 sibling, 1 reply; 17+ messages in thread
From: Lee Jones @ 2024-03-28 10:42 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Pavel Machek, Jaroslav Kysela, Takashi Iwai,
	Heiner Kallweit
  Cc: linux-leds, linux-sound, linux-mips

On Tue, 05 Mar 2024, Lee Jones wrote:

> On Tue, 05 Mar 2024, Lee Jones wrote:
> 
> > On Mon, 04 Mar 2024 21:56:29 +0100, Heiner Kallweit wrote:
> > > If a simple trigger is assigned to a LED, then the LED may be off until
> > > the next led_trigger_event() call. This may be an issue for simple
> > > triggers with rare led_trigger_event() calls, e.g. power supply
> > > charging indicators (drivers/power/supply/power_supply_leds.c).
> > > Therefore persist the brightness value of the last led_trigger_event()
> > > call and use this value if the trigger is assigned to a LED.
> > > This change allows to use simple triggers in more cases.
> > > As a first use case simplify handling of the mute audio trigger.
> > > 
> > > [...]
> > 
> > Applied, thanks!
> > 
> > [1/3] leds: trigger: Store brightness set by led_trigger_event()
> >       commit: 575129855dee0e364af7df84a77ab5cca54b1442
> > [2/3] ALSA: control-led: Integrate mute led trigger
> >       commit: ba8adb1646ee498029ac12b20e792d9d0dd17920
> > [3/3] leds: trigger: audio: Remove this trigger
> >       commit: 2c61168294d0ea42a5542dbc864afb03a76bbc11
> 
> Submitted for build testing.
> 
> Once succeeded, a PR will follow for other maintainers to pull from.

Rebased onto v6.9-rc1 and resubmitted for build testing.

-- 
Lee Jones [李琼斯]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger
  2024-03-28 10:42     ` Lee Jones
@ 2024-04-05  9:22       ` Heiner Kallweit
  2024-04-11  9:22         ` Lee Jones
  0 siblings, 1 reply; 17+ messages in thread
From: Heiner Kallweit @ 2024-04-05  9:22 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-leds, linux-sound, linux-mips, Thomas Bogendoerfer,
	Takashi Iwai, Jaroslav Kysela, Pavel Machek

On 28.03.2024 11:42, Lee Jones wrote:
> On Tue, 05 Mar 2024, Lee Jones wrote:
> 
>> On Tue, 05 Mar 2024, Lee Jones wrote:
>>
>>> On Mon, 04 Mar 2024 21:56:29 +0100, Heiner Kallweit wrote:
>>>> If a simple trigger is assigned to a LED, then the LED may be off until
>>>> the next led_trigger_event() call. This may be an issue for simple
>>>> triggers with rare led_trigger_event() calls, e.g. power supply
>>>> charging indicators (drivers/power/supply/power_supply_leds.c).
>>>> Therefore persist the brightness value of the last led_trigger_event()
>>>> call and use this value if the trigger is assigned to a LED.
>>>> This change allows to use simple triggers in more cases.
>>>> As a first use case simplify handling of the mute audio trigger.
>>>>
>>>> [...]
>>>
>>> Applied, thanks!
>>>
>>> [1/3] leds: trigger: Store brightness set by led_trigger_event()
>>>       commit: 575129855dee0e364af7df84a77ab5cca54b1442
>>> [2/3] ALSA: control-led: Integrate mute led trigger
>>>       commit: ba8adb1646ee498029ac12b20e792d9d0dd17920
>>> [3/3] leds: trigger: audio: Remove this trigger
>>>       commit: 2c61168294d0ea42a5542dbc864afb03a76bbc11
>>
>> Submitted for build testing.
>>
>> Once succeeded, a PR will follow for other maintainers to pull from.
> 
> Rebased onto v6.9-rc1 and resubmitted for build testing.
> 
Can the series be expected soon in linux-next for broader testing?


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger
  2024-04-05  9:22       ` Heiner Kallweit
@ 2024-04-11  9:22         ` Lee Jones
  0 siblings, 0 replies; 17+ messages in thread
From: Lee Jones @ 2024-04-11  9:22 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: linux-leds, linux-sound, linux-mips, Thomas Bogendoerfer,
	Takashi Iwai, Jaroslav Kysela, Pavel Machek

On Fri, 05 Apr 2024, Heiner Kallweit wrote:

> On 28.03.2024 11:42, Lee Jones wrote:
> > On Tue, 05 Mar 2024, Lee Jones wrote:
> > 
> >> On Tue, 05 Mar 2024, Lee Jones wrote:
> >>
> >>> On Mon, 04 Mar 2024 21:56:29 +0100, Heiner Kallweit wrote:
> >>>> If a simple trigger is assigned to a LED, then the LED may be off until
> >>>> the next led_trigger_event() call. This may be an issue for simple
> >>>> triggers with rare led_trigger_event() calls, e.g. power supply
> >>>> charging indicators (drivers/power/supply/power_supply_leds.c).
> >>>> Therefore persist the brightness value of the last led_trigger_event()
> >>>> call and use this value if the trigger is assigned to a LED.
> >>>> This change allows to use simple triggers in more cases.
> >>>> As a first use case simplify handling of the mute audio trigger.
> >>>>
> >>>> [...]
> >>>
> >>> Applied, thanks!
> >>>
> >>> [1/3] leds: trigger: Store brightness set by led_trigger_event()
> >>>       commit: 575129855dee0e364af7df84a77ab5cca54b1442
> >>> [2/3] ALSA: control-led: Integrate mute led trigger
> >>>       commit: ba8adb1646ee498029ac12b20e792d9d0dd17920
> >>> [3/3] leds: trigger: audio: Remove this trigger
> >>>       commit: 2c61168294d0ea42a5542dbc864afb03a76bbc11
> >>
> >> Submitted for build testing.
> >>
> >> Once succeeded, a PR will follow for other maintainers to pull from.
> > 
> > Rebased onto v6.9-rc1 and resubmitted for build testing.
> > 
> Can the series be expected soon in linux-next for broader testing?

Yes.  Catching-up today and this is on the list.

-- 
Lee Jones [李琼斯]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [GIT PULL] Immutable branch between MFD, MIPS and Sound due for the v6.10 merge window
  2024-03-04 20:56 [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger Heiner Kallweit
                   ` (4 preceding siblings ...)
  2024-03-05 12:08 ` Lee Jones
@ 2024-04-11 15:44 ` Lee Jones
  5 siblings, 0 replies; 17+ messages in thread
From: Lee Jones @ 2024-04-11 15:44 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: Thomas Bogendoerfer, Pavel Machek, Jaroslav Kysela, Takashi Iwai,
	linux-leds@vger.kernel.org, linux-sound, linux-mips

Enjoy!

The following changes since commit 4cece764965020c22cff7665b18a012006359095:

  Linux 6.9-rc1 (2024-03-24 14:10:05 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds.git ib-leds-mips-sound-v6.10

for you to fetch changes up to ab2ab9e69ef9734b875ce6d43fe3f9f90135daae:

  leds: trigger: audio: Remove this trigger (2024-03-28 10:40:24 +0000)

----------------------------------------------------------------
Immutable branch between MFD, MIPS and Sound due for the v6.10 merge window

----------------------------------------------------------------
Heiner Kallweit (3):
      leds: trigger: Store brightness set by led_trigger_event()
      ALSA: control-led: Integrate mute led trigger
      leds: trigger: audio: Remove this trigger

 arch/mips/configs/ci20_defconfig     |  1 -
 drivers/leds/led-triggers.c          |  6 ++--
 drivers/leds/trigger/Kconfig         |  7 ----
 drivers/leds/trigger/Makefile        |  1 -
 drivers/leds/trigger/ledtrig-audio.c | 67 ------------------------------------
 include/linux/leds.h                 | 29 ++++++++--------
 sound/core/Kconfig                   |  1 -
 sound/core/control_led.c             | 20 +++++++++--
 8 files changed, 36 insertions(+), 96 deletions(-)
 delete mode 100644 drivers/leds/trigger/ledtrig-audio.c

-- 
Lee Jones [李琼斯]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-04-11 15:44 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-04 20:56 [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger Heiner Kallweit
2024-03-04 20:57 ` [PATCH v2 1/3] leds: trigger: Store brightness set by led_trigger_event() Heiner Kallweit
2024-03-04 20:58 ` [PATCH v2 2/3] ALSA: control-led: Integrate mute led trigger Heiner Kallweit
2024-03-04 20:59 ` [PATCH v2 3/3] leds: trigger: audio: Remove this trigger Heiner Kallweit
2024-03-05  9:08 ` [PATCH v2 0/3] leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger Takashi Iwai
2024-03-05 12:08 ` Lee Jones
2024-03-05 12:09   ` Lee Jones
2024-03-05 14:54     ` Lee Jones
2024-03-05 15:56       ` Heiner Kallweit
2024-03-05 16:06         ` Lee Jones
2024-03-08 17:30           ` Heiner Kallweit
2024-03-27 12:08           ` Heiner Kallweit
2024-03-27 13:14             ` Lee Jones
2024-03-28 10:42     ` Lee Jones
2024-04-05  9:22       ` Heiner Kallweit
2024-04-11  9:22         ` Lee Jones
2024-04-11 15:44 ` [GIT PULL] Immutable branch between MFD, MIPS and Sound due for the v6.10 merge window Lee Jones

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).