diff options
author | Hans de Goede <hdegoede@redhat.com> | 2017-03-16 11:55:35 +0100 |
---|---|---|
committer | Darren Hart (VMware) <dvhart@infradead.org> | 2017-04-13 10:12:46 -0700 |
commit | 9c656b07997f518ab407dd990aaf55f358337bd6 (patch) | |
tree | 2c18c163605848b7e5c040f593e3869eca4ff610 /drivers/platform/x86/dell-wmi.c | |
parent | e5bf5df7858e2339d277427129139995628c49a7 (diff) | |
download | linux-9c656b07997f518ab407dd990aaf55f358337bd6.tar.gz linux-9c656b07997f518ab407dd990aaf55f358337bd6.tar.bz2 linux-9c656b07997f518ab407dd990aaf55f358337bd6.zip |
platform/x86: dell-*: Call new led hw_changed API on kbd brightness change
Make dell-wmi notify on hotkey kbd brightness changes, listen for this
in dell-laptop and call led_classdev_notify_brightness_hw_changed.
This will allow userspace to monitor (poll) for brightness changes on
these LEDs caused by the hotkey.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Diffstat (limited to 'drivers/platform/x86/dell-wmi.c')
-rw-r--r-- | drivers/platform/x86/dell-wmi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c index d921b26267e9..8a64c7967753 100644 --- a/drivers/platform/x86/dell-wmi.c +++ b/drivers/platform/x86/dell-wmi.c @@ -329,6 +329,10 @@ static void dell_wmi_process_key(int type, int code) if (type == 0x0000 && code == 0xe025 && !wmi_requires_smbios_request) return; + if (key->keycode == KEY_KBDILLUMTOGGLE) + dell_laptop_call_notifier( + DELL_LAPTOP_KBD_BACKLIGHT_BRIGHTNESS_CHANGED, NULL); + sparse_keymap_report_entry(dell_wmi_input_dev, key, 1, true); } |