]> git.baikalelectronics.ru Git - kernel.git/commit
toshiba_acpi: Fix keyboard backlight sysfs entries not being updated
authorAzael Avalos <coproscefalo@gmail.com>
Mon, 23 Nov 2015 17:51:30 +0000 (10:51 -0700)
committerDarren Hart <dvhart@linux.intel.com>
Tue, 19 Jan 2016 23:49:21 +0000 (15:49 -0800)
commit96de2c1b3d5ffa383a75e593c3bc8a75c7cec875
treea48e2553627b78a7d12d9e53e5b8da579e0ecaa7
parent6acc794aaaa17cd82bd2281d22b3726963d5f626
toshiba_acpi: Fix keyboard backlight sysfs entries not being updated

Certain Toshiba models with the second generation keyboard backlight
(type 2) do not generate the keyboard backlight changed event (0x92),
and thus, the sysfs entries are never being updated.

This patch adds a workquee and a global boolean variable to address
the issue.

For those models that do generate the event, the sysfs entries are
being updated via the *notify function and the boolean is set to
true to avoid a second call to update the entries.

For those models that do not generate the event, the workquee is
used to update the sysfs entries and also to emulate the event via
netlink, to make userspace aware of such change.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
drivers/platform/x86/toshiba_acpi.c