]> git.baikalelectronics.ru Git - kernel.git/commit
platform/x86: dell-laptop: Filter out spurious keyboard backlight change events
authorHans de Goede <hdegoede@redhat.com>
Thu, 11 Jan 2018 14:14:39 +0000 (15:14 +0100)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 16 Jan 2018 15:24:15 +0000 (17:24 +0200)
commit0813c35a81d3a233dea3f8fda29435da26333160
tree55b02eb707f6ea51c7287ac584ce8cecbde3504b
parent136820c8905b4507cb3d025ac500d0866c49ae6c
platform/x86: dell-laptop: Filter out spurious keyboard backlight change events

On some Dell XPS models WMI events of type 0x0000 reporting a keycode of
0xe00c get reported when the brightness of the LCD panel changes.

This leads to us reporting false-positive kbd_led change events to
userspace which in turn leads to the kbd backlight OSD showing when it
should not.

We already read the current keyboard backlight brightness value when
reporting events because the led_classdev_notify_brightness_hw_changed
API requires this. Compare this value to the last known value and filter
out duplicate events, fixing this.

Note the fixed issue is esp. a problem on XPS models with an ambient light
sensor and automatic brightness adjustments turned on, this causes the kbd
backlight OSD to show all the time there.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1514969
Fixes: 05f4006cfb ("platform/x86: dell-*: Call new led hw_changed API ...")
Acked-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/dell-laptop.c