Skip to contentSkip to conversation

leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger

PATCH Applied Heiner Kallweit 3 participants 17 messages Mar 4, 2024 – Apr 11, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover leds: trigger: Improve handling of led_trigger_event() and simplify mute audio trigger

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
Signature · 1 line
2.44.0
#1 lore raw

PATCH v2 1/3 leds: trigger: Store brightness set by led_trigger_event()

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.

---
 drivers/leds/led-triggers.c |  6 ++++--
 include/linux/leds.h        | 15 +++++++++++++++
 2 files changed, 19 insertions(+), 2 deletions(-)
drivers/leds/led-triggers.c +4 -2
index 0f5ac3005..b1b323b19 100644
@@ -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);
include/linux/leds.h +15 -0
index 7598d4729..48fff5980 100644
@@ -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 */
Signature · 1 line
2.44.0
#2 lore raw

PATCH v2 2/3 ALSA: control-led: Integrate mute led trigger

In reply to Heiner Kallweit

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.

---
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(-)
drivers/leds/trigger/Kconfig +0 -7
index d11d80176..31576952e 100644
@@ -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
drivers/leds/trigger/Makefile +0 -1
index 25c4db97c..242f6c4e3 100644
@@ -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
sound/core/Kconfig +0 -1
index 8077f481d..b970a1734 100644
@@ -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"
sound/core/control_led.c +17 -3
index 3d37e9fa7..061a8ea23 100644
@@ -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");
Signature · 1 line
2.44.0
#3 lore raw

PATCH v2 3/3 leds: trigger: audio: Remove this trigger

In reply to Heiner Kallweit

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

---
 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
arch/mips/configs/ci20_defconfig +0 -1
index cdf2a782d..7827b2b39 100644
@@ -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
drivers/leds/trigger/ledtrig-audio.c deleted +0 -67

67 lines not on this page · raw message

include/linux/leds.h +0 -14
index 48fff5980..d2668b427 100644
@@ -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 */
Signature · 1 line
2.44.0
Reviewed-by on the v2 series
#4 lore raw
In reply to Heiner Kallweit
Quoted 18 lines · Heiner Kallweit

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.

Quoted 4 lines

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

thanks,

Takashi

maintainer Applied
#5 lore raw
In reply to Heiner Kallweit
Quoted 10 lines · Heiner Kallweit

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 [李琼斯]

maintainer
#6 lore raw
Quoted 12 lines · Lee Jones
Quoted 10 lines · Heiner Kallweit

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.

[...]

Quoted 8 lines

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.

Signature · 1 line
Lee Jones [李琼斯]
maintainer
#7 lore raw
Quoted 23 lines · Lee Jones
Quoted 12 lines · Lee Jones
Quoted 10 lines · Heiner Kallweit

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.

[...]

Quoted 8 lines

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
Quoted 3 lines

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

Signature · 1 line
Lee Jones [李琼斯]
#8 lore raw
Quoted 72 lines · Lee Jones
Quoted 23 lines · Lee Jones
Quoted 12 lines · Lee Jones
Quoted 10 lines · Heiner Kallweit

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.

[...]

Quoted 8 lines

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
Quoted 3 lines

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

Quoted 8 lines

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.

maintainer
#9 lore raw
Quoted 77 lines · Heiner Kallweit
Quoted 76 lines · Lee Jones
Quoted 23 lines · Lee Jones
Quoted 12 lines · Lee Jones
Quoted 10 lines · Heiner Kallweit

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.

[...]

Quoted 8 lines

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
Quoted 3 lines

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

Quoted 8 lines
Quoted 4 lines

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.

Signature · 1 line
Lee Jones [李琼斯]
#10 lore raw
Quoted 84 lines · Lee Jones
Quoted 82 lines · Heiner Kallweit
Quoted 80 lines · Lee Jones
Quoted 23 lines · Lee Jones
Quoted 12 lines · Lee Jones
Quoted 10 lines · Heiner Kallweit

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.

[...]

Quoted 8 lines

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
Quoted 3 lines

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

Quoted 6 lines
Quoted 3 lines

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.

#11 lore raw
In reply to Lee Jones
Quoted 84 lines · Lee Jones
Quoted 82 lines · Heiner Kallweit
Quoted 80 lines · Lee Jones
Quoted 23 lines · Lee Jones
Quoted 12 lines · Lee Jones
Quoted 10 lines · Heiner Kallweit

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.

[...]

Quoted 8 lines

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
Quoted 3 lines

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

Quoted 6 lines
Quoted 3 lines

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?

maintainer
#12 lore raw
Quoted 85 lines · Heiner Kallweit
Quoted 84 lines · Lee Jones
Quoted 82 lines · Heiner Kallweit
Quoted 80 lines · Lee Jones
Quoted 23 lines · Lee Jones
Quoted 12 lines · Lee Jones
Quoted 10 lines · Heiner Kallweit

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.

[...]

Quoted 8 lines

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
Quoted 3 lines

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

Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

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.

Signature · 1 line
Lee Jones [李琼斯]
maintainer
#13 lore raw
In reply to Lee Jones
Quoted 23 lines · Lee Jones
Quoted 12 lines · Lee Jones
Quoted 10 lines · Heiner Kallweit

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.

[...]

Quoted 8 lines

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
Quoted 3 lines

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.

Signature · 1 line
Lee Jones [李琼斯]
#14 lore raw
Quoted 25 lines · Lee Jones
Quoted 23 lines · Lee Jones
Quoted 20 lines · Lee Jones
Quoted 10 lines · Heiner Kallweit

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
Quoted 6 lines
Quoted 3 lines

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?

maintainer
#15 lore raw
Quoted 26 lines · Heiner Kallweit
Quoted 25 lines · Lee Jones
Quoted 23 lines · Lee Jones
Quoted 20 lines · Lee Jones
Quoted 10 lines · Heiner Kallweit

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
Quoted 7 lines
Quoted 6 lines
Quoted 3 lines

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.

Signature · 1 line
Lee Jones [李琼斯]
maintainer
#16 lore raw

[GIT PULL] Immutable branch between MFD, MIPS and Sound due for the v6.10 merge window

In reply to Heiner Kallweit

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
Signature · 1 line
Lee Jones [李琼斯]