All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] platform/x86: thinkpad_acpi: Add LED_RETAIN_AT_SHUTDOWN to led_class_devs
@ 2021-11-23 21:05 Hans de Goede
  2021-11-23 21:05 ` [PATCH 2/2] platform/x86: thinkpad_acpi: Add lid-logo-led to the list of safe LEDs Hans de Goede
  2021-11-25 15:35 ` [PATCH 1/2] platform/x86: thinkpad_acpi: Add LED_RETAIN_AT_SHUTDOWN to led_class_devs Hans de Goede
  0 siblings, 2 replies; 9+ messages in thread
From: Hans de Goede @ 2021-11-23 21:05 UTC (permalink / raw)
  To: Mark Gross, Andy Shevchenko, Mark Pearson
  Cc: Hans de Goede, platform-driver-x86

Add the LED_RETAIN_AT_SHUTDOWN flag to the registered led_class_devs so
that the LEDs do not get turned-off when reloading the driver and thus so
that they also stay under default EC control when reloading the driver,
unless explicitly overridden by the user.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/platform/x86/thinkpad_acpi.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index a4ef57ddcc90..49fdf16b2db9 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -5827,6 +5827,7 @@ static int __init tpacpi_init_led(unsigned int led)
 		tpacpi_leds[led].led_classdev.brightness_get = &led_sysfs_get;
 
 	tpacpi_leds[led].led_classdev.name = tpacpi_led_names[led];
+	tpacpi_leds[led].led_classdev.flags = LED_RETAIN_AT_SHUTDOWN;
 	tpacpi_leds[led].led = led;
 
 	return led_classdev_register(&tpacpi_pdev->dev, &tpacpi_leds[led].led_classdev);
-- 
2.33.1


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

end of thread, other threads:[~2021-11-25 15:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 21:05 [PATCH 1/2] platform/x86: thinkpad_acpi: Add LED_RETAIN_AT_SHUTDOWN to led_class_devs Hans de Goede
2021-11-23 21:05 ` [PATCH 2/2] platform/x86: thinkpad_acpi: Add lid-logo-led to the list of safe LEDs Hans de Goede
2021-11-24 15:53   ` Thomas Weißschuh
2021-11-24 16:28     ` Hans de Goede
2021-11-24 19:13       ` [External] " Mark Pearson
2021-11-24 19:38         ` Hans de Goede
2021-11-24 22:59       ` Thomas Weißschuh
2021-11-25  8:29         ` Hans de Goede
2021-11-25 15:35 ` [PATCH 1/2] platform/x86: thinkpad_acpi: Add LED_RETAIN_AT_SHUTDOWN to led_class_devs Hans de Goede

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.