diff options
author | Jeremy Cline <jeremy@jcline.org> | 2018-02-23 09:36:25 -0500 |
---|---|---|
committer | Jeremy Cline <jeremy@jcline.org> | 2018-02-23 09:36:25 -0500 |
commit | 294e924caaebdf82670fbd873f0484fa2f03235d (patch) | |
tree | 15be74fcdc919569cd0f18448b623d0c7570f565 | |
parent | a62acee612826cbf53475dfdea946759399a6148 (diff) | |
download | kernel-294e924caaebdf82670fbd873f0484fa2f03235d.tar.gz kernel-294e924caaebdf82670fbd873f0484fa2f03235d.tar.xz kernel-294e924caaebdf82670fbd873f0484fa2f03235d.zip |
Linux v4.16-rc2-189-g0f9da844d877
-rw-r--r-- | gitrev | 2 | ||||
-rw-r--r-- | kernel.spec | 8 | ||||
-rw-r--r-- | platform-x86-Only-activate-tablet-mode-switch-on-2-i.patch | 95 | ||||
-rw-r--r-- | sources | 2 |
4 files changed, 104 insertions, 3 deletions
@@ -1 +1 @@ -af3e79d29555b97dd096e2f8e36a0f50213808a8 +0f9da844d87796ac31b04e81ee95e155e9043132 diff --git a/kernel.spec b/kernel.spec index b0a1748f2..8bc9ebb56 100644 --- a/kernel.spec +++ b/kernel.spec @@ -69,7 +69,7 @@ Summary: The Linux kernel # The rc snapshot level %global rcrev 2 # The git snapshot level -%define gitrev 2 +%define gitrev 3 # Set rpm version accordingly %define rpmversion 4.%{upstream_sublevel}.0 %endif @@ -604,6 +604,9 @@ Patch313: arm-crypto-sunxi-ss-Add-MODULE_ALIAS-to-sun4i-ss.patch # CVE-2018-7273 rhbz 1547384 1547386 Patch500: floppy-Don-t-print-kernel-addresses-to-log-in-show_f.patch +# Fix keyboard on Dell XPS 9360 https://patchwork.kernel.org/patch/10236253/ +Patch501: platform-x86-Only-activate-tablet-mode-switch-on-2-i.patch + # 600 - Patches for improved Bay and Cherry Trail device support # Below patches are submitted upstream, awaiting review / merging @@ -1875,6 +1878,9 @@ fi # # %changelog +* Fri Feb 23 2018 Jeremy Cline <jeremy@jcline.org> - 4.16.0-0.rc2.git3.1 +- Linux v4.16-rc2-189-g0f9da844d877 + * Wed Feb 21 2018 Jeremy Cline <jeremy@jcline.org> - 4.16.0-0.rc2.git2.1 - Linux v4.16-rc2-64-gaf3e79d29555 diff --git a/platform-x86-Only-activate-tablet-mode-switch-on-2-i.patch b/platform-x86-Only-activate-tablet-mode-switch-on-2-i.patch new file mode 100644 index 000000000..ab9a24faa --- /dev/null +++ b/platform-x86-Only-activate-tablet-mode-switch-on-2-i.patch @@ -0,0 +1,95 @@ +From 7714f7a44a29a4e873d5acfd4c9549c87a4bb4e4 Mon Sep 17 00:00:00 2001 +From: Mario Limonciello <mario.limonciello@dell.com> +Date: Thu, 22 Feb 2018 13:58:42 -0600 +Subject: [PATCH] platform/x86: Only activate tablet mode switch on 2-in-1's + +Some laptops such as the XPS 9360 support the intel-vbtn INT33D6 +interface but don't initialize the bit that intel-vbtn uses to +represent switching tablet mode. + +By running this only on real 2-in-1's it shouldn't cause false +positives. + +Fixes: 30323fb6d5 ("Support tablet mode switch") +Reported-by: Jeremy Cline <jeremy@jcline.org> +Signed-off-by: Mario Limonciello <mario.limonciello@dell.com> +--- + drivers/platform/x86/intel-vbtn.c | 46 ++++++++++++++++++++++++--------------- + 1 file changed, 29 insertions(+), 17 deletions(-) + +diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c +index b703d6f5b099..8173307d6bb1 100644 +--- a/drivers/platform/x86/intel-vbtn.c ++++ b/drivers/platform/x86/intel-vbtn.c +@@ -7,6 +7,7 @@ + */ + + #include <linux/acpi.h> ++#include <linux/dmi.h> + #include <linux/input.h> + #include <linux/input/sparse-keymap.h> + #include <linux/kernel.h> +@@ -97,9 +98,35 @@ static void notify_handler(acpi_handle handle, u32 event, void *context) + dev_dbg(&device->dev, "unknown event index 0x%x\n", event); + } + +-static int intel_vbtn_probe(struct platform_device *device) ++static void detect_tablet_mode(struct platform_device *device) + { ++ const char *chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE); ++ struct intel_vbtn_priv *priv = dev_get_drvdata(&device->dev); ++ acpi_handle handle = ACPI_HANDLE(&device->dev); + struct acpi_buffer vgbs_output = { ACPI_ALLOCATE_BUFFER, NULL }; ++ union acpi_object *obj; ++ acpi_status status; ++ int m; ++ ++ if (!(chassis_type && strcmp(chassis_type, "31") == 0)) ++ goto out; ++ ++ status = acpi_evaluate_object(handle, "VGBS", NULL, &vgbs_output); ++ if (ACPI_FAILURE(status)) ++ goto out; ++ ++ obj = vgbs_output.pointer; ++ if (!(obj && obj->type == ACPI_TYPE_INTEGER)) ++ goto out; ++ ++ m = !(obj->integer.value & TABLET_MODE_FLAG); ++ input_report_switch(priv->input_dev, SW_TABLET_MODE, m); ++out: ++ kfree(vgbs_output.pointer); ++} ++ ++static int intel_vbtn_probe(struct platform_device *device) ++{ + acpi_handle handle = ACPI_HANDLE(&device->dev); + struct intel_vbtn_priv *priv; + acpi_status status; +@@ -122,22 +149,7 @@ static int intel_vbtn_probe(struct platform_device *device) + return err; + } + +- /* +- * VGBS being present and returning something means we have +- * a tablet mode switch. +- */ +- status = acpi_evaluate_object(handle, "VGBS", NULL, &vgbs_output); +- if (ACPI_SUCCESS(status)) { +- union acpi_object *obj = vgbs_output.pointer; +- +- if (obj && obj->type == ACPI_TYPE_INTEGER) { +- int m = !(obj->integer.value & TABLET_MODE_FLAG); +- +- input_report_switch(priv->input_dev, SW_TABLET_MODE, m); +- } +- } +- +- kfree(vgbs_output.pointer); ++ detect_tablet_mode(device); + + status = acpi_install_notify_handler(handle, + ACPI_DEVICE_NOTIFY, +-- +2.16.2 + @@ -1,3 +1,3 @@ SHA512 (linux-4.15.tar.xz) = c00d92659df815a53dcac7dde145b742b1f20867d380c07cb09ddb3295d6ff10f8931b21ef0b09d7156923a3957b39d74d87c883300173b2e20690d2b4ec35ea SHA512 (patch-4.16-rc2.xz) = 3b72039fee7a481ed6a491a5795b9f1184c8fb4597a96332b513856f82a4410bbffa5bf61b59ec7b6ed4f789b22027d3f20d91b024b9fd3afbbd9ff56499cb8e -SHA512 (patch-4.16-rc2-git2.xz) = 4766e15bdb1d4af85c77733388a80934d9fab143c7170d2abe4e8b088930ef58db66d22f4f3d206e93a80d5bb15407f53142d9c86f6b684c715c181709642219 +SHA512 (patch-4.16-rc2-git3.xz) = c1854906256e363812d85fe94876cff0e3c5fee6f3a8fd5a994db12439a0f0e1aa0df0290fbeb262d0fa770da1252a0e83a2d846d78e4f8b78157c2baa4e0b2e |