platform-drivers-x86 for v4.15-3

Correct an error in the evdev protocol in asus-wireless which results in
 dropped key events in recent versions of libinput. Add a quirk for
 keyboard lighting for a specific Dell laptop. Silence a static analysis
 warning regarding unchecked return values of small kmalloc() allocations
 in dell-wmi.
 
 The following is an automated git shortlog grouped by driver:
 
 asus-wireless:
  -  send an EV_SYN/SYN_REPORT between state changes
 
 dell-laptop:
  -  Fix keyboard max lighting for Dell Latitude E6410
 
 dell-wmi:
  -  check for kmalloc() errors
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJaMGsQAAoJEKbMaAwKp364nxYH+wQPoNXh23oNQWG+y9QdldEu
 /bI5tbQVfmMLmSNcI2tjq7NS8QGRbn2sTIMilqsrLJAR7RY78uvISOwV8JeLHrd4
 dMjh2VgcOQb6IuVT9H4oS+mSnDhXxtqDZrMlTp9wDztFcRgoP2RrUuxV/RG3ZiDH
 qtKq3RUfB+j6vOXkXifdK83x+FVIk5PiFrMpEytrlgT0y/FWbMz0aj4dm1mMx9Yl
 tS8uuEl9Gh6a+XPi6sMHJ0pH5cbNxmO9hPyRg3Jq+KZYj+NfyEytw+G0J1CAF0LO
 mM37C8gs9ISEOCnUCopZh5fA+sM7WIUoe7jLFiw6Ocj2yU2adp3p214eP3TGZ4Y=
 =hrbr
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v4.15-3' of git://git.infradead.org/linux-platform-drivers-x86

Pull x86 platform driver fixes from Darren Hart:

 - Correct an error in the evdev protocol in asus-wireless which results
   in dropped key events in recent versions of libinput

 - Add a quirk for keyboard lighting for a specific Dell laptop

 - Silence a static analysis warning regarding unchecked return values
   of small kmalloc() allocations in dell-wmi

* tag 'platform-drivers-x86-v4.15-3' of git://git.infradead.org/linux-platform-drivers-x86:
  platform/x86: dell-wmi: check for kmalloc() errors
  platform/x86: asus-wireless: send an EV_SYN/SYN_REPORT between state changes
  platform/x86: dell-laptop: Fix keyboard max lighting for Dell Latitude E6410
This commit is contained in:
Linus Torvalds 2017-12-12 17:19:58 -08:00
commit d39a01eff9
3 changed files with 20 additions and 0 deletions

View File

@ -118,6 +118,7 @@ static void asus_wireless_notify(struct acpi_device *adev, u32 event)
return; return;
} }
input_report_key(data->idev, KEY_RFKILL, 1); input_report_key(data->idev, KEY_RFKILL, 1);
input_sync(data->idev);
input_report_key(data->idev, KEY_RFKILL, 0); input_report_key(data->idev, KEY_RFKILL, 0);
input_sync(data->idev); input_sync(data->idev);
} }

View File

@ -37,6 +37,7 @@
struct quirk_entry { struct quirk_entry {
u8 touchpad_led; u8 touchpad_led;
u8 kbd_led_levels_off_1;
int needs_kbd_timeouts; int needs_kbd_timeouts;
/* /*
@ -67,6 +68,10 @@ static struct quirk_entry quirk_dell_xps13_9333 = {
.kbd_timeouts = { 0, 5, 15, 60, 5 * 60, 15 * 60, -1 }, .kbd_timeouts = { 0, 5, 15, 60, 5 * 60, 15 * 60, -1 },
}; };
static struct quirk_entry quirk_dell_latitude_e6410 = {
.kbd_led_levels_off_1 = 1,
};
static struct platform_driver platform_driver = { static struct platform_driver platform_driver = {
.driver = { .driver = {
.name = "dell-laptop", .name = "dell-laptop",
@ -269,6 +274,15 @@ static const struct dmi_system_id dell_quirks[] __initconst = {
}, },
.driver_data = &quirk_dell_xps13_9333, .driver_data = &quirk_dell_xps13_9333,
}, },
{
.callback = dmi_matched,
.ident = "Dell Latitude E6410",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6410"),
},
.driver_data = &quirk_dell_latitude_e6410,
},
{ } { }
}; };
@ -1149,6 +1163,9 @@ static int kbd_get_info(struct kbd_info *info)
units = (buffer->output[2] >> 8) & 0xFF; units = (buffer->output[2] >> 8) & 0xFF;
info->levels = (buffer->output[2] >> 16) & 0xFF; info->levels = (buffer->output[2] >> 16) & 0xFF;
if (quirks && quirks->kbd_led_levels_off_1 && info->levels)
info->levels--;
if (units & BIT(0)) if (units & BIT(0))
info->seconds = (buffer->output[3] >> 0) & 0xFF; info->seconds = (buffer->output[3] >> 0) & 0xFF;
if (units & BIT(1)) if (units & BIT(1))

View File

@ -639,6 +639,8 @@ static int dell_wmi_events_set_enabled(bool enable)
int ret; int ret;
buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL); buffer = kzalloc(sizeof(struct calling_interface_buffer), GFP_KERNEL);
if (!buffer)
return -ENOMEM;
buffer->cmd_class = CLASS_INFO; buffer->cmd_class = CLASS_INFO;
buffer->cmd_select = SELECT_APP_REGISTRATION; buffer->cmd_select = SELECT_APP_REGISTRATION;
buffer->input[0] = 0x10000; buffer->input[0] = 0x10000;