[PATCH v5 5/6] platform: x86: dell-laptop: Set keyboard backlight led device default trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Set kbd_led.default_trigger to "kbd-backlight", this will allow user
space to be notified of brightness changes through
ledtrig_kbd_backlight().

Note this also sets the LED_TRIGGER_READ_ONLY flag since the brightness
is hardwired to be controlled by the kbd-backlight hotkey.

Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
---
Changes in v5:
-This is a new patch in v5 of this patch-set
---
 drivers/platform/x86/dell-laptop.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index 14392a0..6c0f047 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -1937,9 +1937,11 @@ static int kbd_led_level_set(struct led_classdev *led_cdev,
 
 static struct led_classdev kbd_led = {
 	.name           = "dell::kbd_backlight",
+	.flags		= LED_TRIGGER_READ_ONLY,
 	.brightness_set_blocking = kbd_led_level_set,
 	.brightness_get = kbd_led_level_get,
 	.groups         = kbd_led_groups,
+	.default_trigger = "kbd-backlight",
 };
 
 static int __init kbd_led_init(struct device *dev)
-- 
2.9.3


------------------------------------------------------------------------------
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel



[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux