commit
c38a855431
2996
patches/4.18/0001-surface-acpi.patch
Normal file
2996
patches/4.18/0001-surface-acpi.patch
Normal file
File diff suppressed because it is too large
Load diff
63
patches/4.18/0002-resume-delay.patch
Normal file
63
patches/4.18/0002-resume-delay.patch
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
From 415511ab8182c8948ed31e38cb7d304c61d53277 Mon Sep 17 00:00:00 2001
|
||||||
|
From: qzed <qzed@users.noreply.github.com>
|
||||||
|
Date: Mon, 24 Dec 2018 14:03:51 +0100
|
||||||
|
Subject: [PATCH 2/8] resume-delay
|
||||||
|
|
||||||
|
---
|
||||||
|
kernel/power/suspend.c | 11 +++++++++++
|
||||||
|
kernel/sysctl.c | 9 +++++++++
|
||||||
|
2 files changed, 20 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
|
||||||
|
index 87331565e505..d55f949ee25a 100644
|
||||||
|
--- a/kernel/power/suspend.c
|
||||||
|
+++ b/kernel/power/suspend.c
|
||||||
|
@@ -520,6 +520,8 @@ int suspend_devices_and_enter(suspend_state_t state)
|
||||||
|
goto Resume_devices;
|
||||||
|
}
|
||||||
|
|
||||||
|
+unsigned int resume_delay = 3000;
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* suspend_finish - Clean up before finishing the suspend sequence.
|
||||||
|
*
|
||||||
|
@@ -528,6 +530,15 @@ int suspend_devices_and_enter(suspend_state_t state)
|
||||||
|
*/
|
||||||
|
static void suspend_finish(void)
|
||||||
|
{
|
||||||
|
+ if (resume_delay) {
|
||||||
|
+ /* Give kernel threads a head start, such that usb-storage
|
||||||
|
+ * can detect devices before syslog attempts to write log
|
||||||
|
+ * messages from the suspend code.
|
||||||
|
+ */
|
||||||
|
+ thaw_kernel_threads();
|
||||||
|
+ pr_debug("PM: Sleeping for %d milliseconds.\n", resume_delay);
|
||||||
|
+ msleep(resume_delay);
|
||||||
|
+ }
|
||||||
|
suspend_thaw_processes();
|
||||||
|
pm_notifier_call_chain(PM_POST_SUSPEND);
|
||||||
|
pm_restore_console();
|
||||||
|
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
|
||||||
|
index 2d9837c0aff4..ac704bf71f45 100644
|
||||||
|
--- a/kernel/sysctl.c
|
||||||
|
+++ b/kernel/sysctl.c
|
||||||
|
@@ -308,7 +308,16 @@ static int min_extfrag_threshold;
|
||||||
|
static int max_extfrag_threshold = 1000;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+extern unsigned int resume_delay;
|
||||||
|
+
|
||||||
|
static struct ctl_table kern_table[] = {
|
||||||
|
+ {
|
||||||
|
+ .procname = "resume_delay",
|
||||||
|
+ .data = &resume_delay,
|
||||||
|
+ .maxlen = sizeof(unsigned int),
|
||||||
|
+ .mode = 0644,
|
||||||
|
+ .proc_handler = proc_dointvec,
|
||||||
|
+ },
|
||||||
|
{
|
||||||
|
.procname = "sched_child_runs_first",
|
||||||
|
.data = &sysctl_sched_child_runs_first,
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
From 9c4948b06b2e8d23bbb4d65c7453b6b847d3f237 Mon Sep 17 00:00:00 2001
|
From ac9ac2a05180af9e356f2f4d6840b132b1fb45f7 Mon Sep 17 00:00:00 2001
|
||||||
From: qzed <qzed@users.noreply.github.com>
|
From: qzed <qzed@users.noreply.github.com>
|
||||||
Date: Wed, 19 Sep 2018 19:21:14 +0200
|
Date: Mon, 24 Dec 2018 14:05:07 +0100
|
||||||
Subject: [PATCH] Surface Book 2 / Surface Pro 2017 button support
|
Subject: [PATCH 3/8] buttons
|
||||||
|
|
||||||
---
|
---
|
||||||
drivers/input/misc/soc_button_array.c | 67 +++++++++++++++++++++--
|
drivers/input/misc/soc_button_array.c | 67 +++++++++++++++++++++--
|
||||||
|
@ -152,5 +152,5 @@ index 1b491690ce07..006c94eda7be 100644
|
||||||
if (!button)
|
if (!button)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
--
|
--
|
||||||
2.19.0
|
2.20.1
|
||||||
|
|
|
@ -1,3 +1,25 @@
|
||||||
|
From ddc414a8b8bb0df0763eb793019f5bc616e142bf Mon Sep 17 00:00:00 2001
|
||||||
|
From: qzed <qzed@users.noreply.github.com>
|
||||||
|
Date: Mon, 24 Dec 2018 14:08:40 +0100
|
||||||
|
Subject: [PATCH 4/8] cameras
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/media/usb/uvc/uvc_driver.c | 40 +
|
||||||
|
drivers/staging/Makefile | 1 +
|
||||||
|
drivers/staging/ov5693/Kconfig | 10 +
|
||||||
|
drivers/staging/ov5693/Makefile | 5 +
|
||||||
|
drivers/staging/ov5693/ad5823.c | 218 +++++
|
||||||
|
drivers/staging/ov5693/ad5823.h | 90 ++
|
||||||
|
drivers/staging/ov5693/ov5693.c | 1461 ++++++++++++++++++++++++++++
|
||||||
|
drivers/staging/ov5693/ov5693.h | 848 ++++++++++++++++
|
||||||
|
8 files changed, 2673 insertions(+)
|
||||||
|
create mode 100644 drivers/staging/ov5693/Kconfig
|
||||||
|
create mode 100644 drivers/staging/ov5693/Makefile
|
||||||
|
create mode 100644 drivers/staging/ov5693/ad5823.c
|
||||||
|
create mode 100644 drivers/staging/ov5693/ad5823.h
|
||||||
|
create mode 100644 drivers/staging/ov5693/ov5693.c
|
||||||
|
create mode 100644 drivers/staging/ov5693/ov5693.h
|
||||||
|
|
||||||
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
|
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
|
||||||
index 8e138201330f..db38a76af80b 100644
|
index 8e138201330f..db38a76af80b 100644
|
||||||
--- a/drivers/media/usb/uvc/uvc_driver.c
|
--- a/drivers/media/usb/uvc/uvc_driver.c
|
||||||
|
@ -60,10 +82,10 @@ index e84959a8a684..6a78734cfc5a 100644
|
||||||
+obj-$(CONFIG_VIDEO_OV5693) += ov5693/
|
+obj-$(CONFIG_VIDEO_OV5693) += ov5693/
|
||||||
diff --git a/drivers/staging/ov5693/Kconfig b/drivers/staging/ov5693/Kconfig
|
diff --git a/drivers/staging/ov5693/Kconfig b/drivers/staging/ov5693/Kconfig
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..9fb1bffbe9b3
|
index 000000000000..96000f112c4d
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/staging/ov5693/Kconfig
|
+++ b/drivers/staging/ov5693/Kconfig
|
||||||
@@ -0,0 +1,11 @@
|
@@ -0,0 +1,10 @@
|
||||||
+config VIDEO_OV5693
|
+config VIDEO_OV5693
|
||||||
+ tristate "Omnivision ov5693 sensor support"
|
+ tristate "Omnivision ov5693 sensor support"
|
||||||
+ depends on I2C && VIDEO_V4L2
|
+ depends on I2C && VIDEO_V4L2
|
||||||
|
@ -74,7 +96,6 @@ index 000000000000..9fb1bffbe9b3
|
||||||
+ ov5693 is video camera sensor.
|
+ ov5693 is video camera sensor.
|
||||||
+
|
+
|
||||||
+ It currently only works with the atomisp driver.
|
+ It currently only works with the atomisp driver.
|
||||||
+
|
|
||||||
diff --git a/drivers/staging/ov5693/Makefile b/drivers/staging/ov5693/Makefile
|
diff --git a/drivers/staging/ov5693/Makefile b/drivers/staging/ov5693/Makefile
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..d8a63faa591f
|
index 000000000000..d8a63faa591f
|
||||||
|
@ -88,10 +109,10 @@ index 000000000000..d8a63faa591f
|
||||||
+ccflags-y += -Werror
|
+ccflags-y += -Werror
|
||||||
diff --git a/drivers/staging/ov5693/ad5823.c b/drivers/staging/ov5693/ad5823.c
|
diff --git a/drivers/staging/ov5693/ad5823.c b/drivers/staging/ov5693/ad5823.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..fcb9f5b70f9f
|
index 000000000000..7c34c36e77e5
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/staging/ov5693/ad5823.c
|
+++ b/drivers/staging/ov5693/ad5823.c
|
||||||
@@ -0,0 +1,219 @@
|
@@ -0,0 +1,218 @@
|
||||||
+#include <asm/intel-mid.h>
|
+#include <asm/intel-mid.h>
|
||||||
+#include <linux/bitops.h>
|
+#include <linux/bitops.h>
|
||||||
+#include <linux/device.h>
|
+#include <linux/device.h>
|
||||||
|
@ -310,7 +331,6 @@ index 000000000000..fcb9f5b70f9f
|
||||||
+ ad5823_dev.platform_data = camera_get_af_platform_data();
|
+ ad5823_dev.platform_data = camera_get_af_platform_data();
|
||||||
+ return ad5823_dev.platform_data ? 0 : -ENODEV;
|
+ return ad5823_dev.platform_data ? 0 : -ENODEV;
|
||||||
+}
|
+}
|
||||||
+
|
|
||||||
diff --git a/drivers/staging/ov5693/ad5823.h b/drivers/staging/ov5693/ad5823.h
|
diff --git a/drivers/staging/ov5693/ad5823.h b/drivers/staging/ov5693/ad5823.h
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..8b046c31f3af
|
index 000000000000..8b046c31f3af
|
||||||
|
@ -2728,3 +2748,6 @@ index 000000000000..79aef69666e8
|
||||||
+ .q_focus_abs = ad5823_q_focus_abs,
|
+ .q_focus_abs = ad5823_q_focus_abs,
|
||||||
+};
|
+};
|
||||||
+#endif
|
+#endif
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
|
@ -1,3 +1,74 @@
|
||||||
|
From f2a58519921430701dc3fc4dca924e85e6c2d883 Mon Sep 17 00:00:00 2001
|
||||||
|
From: qzed <qzed@users.noreply.github.com>
|
||||||
|
Date: Mon, 24 Dec 2018 14:14:01 +0100
|
||||||
|
Subject: [PATCH 5/8] ipts
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/gpu/drm/i915/Makefile | 3 +
|
||||||
|
drivers/gpu/drm/i915/i915_drv.c | 7 +
|
||||||
|
drivers/gpu/drm/i915/i915_drv.h | 3 +
|
||||||
|
drivers/gpu/drm/i915/i915_gem_context.c | 12 +
|
||||||
|
drivers/gpu/drm/i915/i915_irq.c | 7 +-
|
||||||
|
drivers/gpu/drm/i915/i915_params.c | 5 +-
|
||||||
|
drivers/gpu/drm/i915/i915_params.h | 5 +-
|
||||||
|
drivers/gpu/drm/i915/intel_dp.c | 4 +-
|
||||||
|
drivers/gpu/drm/i915/intel_guc.h | 1 +
|
||||||
|
drivers/gpu/drm/i915/intel_guc_submission.c | 79 +-
|
||||||
|
drivers/gpu/drm/i915/intel_guc_submission.h | 4 +
|
||||||
|
drivers/gpu/drm/i915/intel_ipts.c | 627 +++++++++++
|
||||||
|
drivers/gpu/drm/i915/intel_ipts.h | 34 +
|
||||||
|
drivers/gpu/drm/i915/intel_lrc.c | 11 +-
|
||||||
|
drivers/gpu/drm/i915/intel_lrc.h | 8 +
|
||||||
|
drivers/gpu/drm/i915/intel_panel.c | 7 +
|
||||||
|
drivers/hid/hid-multitouch.c | 32 +-
|
||||||
|
drivers/misc/Kconfig | 1 +
|
||||||
|
drivers/misc/Makefile | 1 +
|
||||||
|
drivers/misc/ipts/Kconfig | 9 +
|
||||||
|
drivers/misc/ipts/Makefile | 13 +
|
||||||
|
drivers/misc/ipts/ipts-binary-spec.h | 118 +++
|
||||||
|
drivers/misc/ipts/ipts-dbgfs.c | 152 +++
|
||||||
|
drivers/misc/ipts/ipts-gfx.c | 184 ++++
|
||||||
|
drivers/misc/ipts/ipts-gfx.h | 24 +
|
||||||
|
drivers/misc/ipts/ipts-hid.c | 456 ++++++++
|
||||||
|
drivers/misc/ipts/ipts-hid.h | 34 +
|
||||||
|
drivers/misc/ipts/ipts-kernel.c | 1050 +++++++++++++++++++
|
||||||
|
drivers/misc/ipts/ipts-kernel.h | 23 +
|
||||||
|
drivers/misc/ipts/ipts-mei-msgs.h | 585 +++++++++++
|
||||||
|
drivers/misc/ipts/ipts-mei.c | 282 +++++
|
||||||
|
drivers/misc/ipts/ipts-msg-handler.c | 431 ++++++++
|
||||||
|
drivers/misc/ipts/ipts-msg-handler.h | 32 +
|
||||||
|
drivers/misc/ipts/ipts-resource.c | 277 +++++
|
||||||
|
drivers/misc/ipts/ipts-resource.h | 30 +
|
||||||
|
drivers/misc/ipts/ipts-sensor-regs.h | 700 +++++++++++++
|
||||||
|
drivers/misc/ipts/ipts-state.h | 29 +
|
||||||
|
drivers/misc/ipts/ipts.h | 200 ++++
|
||||||
|
drivers/misc/mei/hw-me-regs.h | 1 +
|
||||||
|
drivers/misc/mei/pci-me.c | 1 +
|
||||||
|
include/linux/intel_ipts_if.h | 75 ++
|
||||||
|
41 files changed, 5532 insertions(+), 25 deletions(-)
|
||||||
|
create mode 100644 drivers/gpu/drm/i915/intel_ipts.c
|
||||||
|
create mode 100644 drivers/gpu/drm/i915/intel_ipts.h
|
||||||
|
create mode 100644 drivers/misc/ipts/Kconfig
|
||||||
|
create mode 100644 drivers/misc/ipts/Makefile
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-binary-spec.h
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-dbgfs.c
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-gfx.c
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-gfx.h
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-hid.c
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-hid.h
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-kernel.c
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-kernel.h
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-mei-msgs.h
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-mei.c
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-msg-handler.c
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-msg-handler.h
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-resource.c
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-resource.h
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-sensor-regs.h
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts-state.h
|
||||||
|
create mode 100644 drivers/misc/ipts/ipts.h
|
||||||
|
create mode 100644 include/linux/intel_ipts_if.h
|
||||||
|
|
||||||
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
|
diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
|
||||||
index 4c6adae23e18..1171fbd3a823 100644
|
index 4c6adae23e18..1171fbd3a823 100644
|
||||||
--- a/drivers/gpu/drm/i915/Makefile
|
--- a/drivers/gpu/drm/i915/Makefile
|
||||||
|
@ -13,7 +84,7 @@ index 4c6adae23e18..1171fbd3a823 100644
|
||||||
i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
|
i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
|
||||||
i915-$(CONFIG_DRM_I915_SELFTEST) += \
|
i915-$(CONFIG_DRM_I915_SELFTEST) += \
|
||||||
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
|
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
|
||||||
index 9c449b8d8eab..d5d91d196627 100644
|
index 015f9e93419d..4ecb9b824fc1 100644
|
||||||
--- a/drivers/gpu/drm/i915/i915_drv.c
|
--- a/drivers/gpu/drm/i915/i915_drv.c
|
||||||
+++ b/drivers/gpu/drm/i915/i915_drv.c
|
+++ b/drivers/gpu/drm/i915/i915_drv.c
|
||||||
@@ -53,6 +53,7 @@
|
@@ -53,6 +53,7 @@
|
||||||
|
@ -34,7 +105,7 @@ index 9c449b8d8eab..d5d91d196627 100644
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cleanup_gem:
|
cleanup_gem:
|
||||||
@@ -1441,6 +1445,9 @@ void i915_driver_unload(struct drm_device *dev)
|
@@ -1440,6 +1444,9 @@ void i915_driver_unload(struct drm_device *dev)
|
||||||
struct drm_i915_private *dev_priv = to_i915(dev);
|
struct drm_i915_private *dev_priv = to_i915(dev);
|
||||||
struct pci_dev *pdev = dev_priv->drm.pdev;
|
struct pci_dev *pdev = dev_priv->drm.pdev;
|
||||||
|
|
||||||
|
@ -45,10 +116,10 @@ index 9c449b8d8eab..d5d91d196627 100644
|
||||||
|
|
||||||
if (i915_gem_suspend(dev_priv))
|
if (i915_gem_suspend(dev_priv))
|
||||||
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
|
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
|
||||||
index 71e1aa54f774..62686739ff57 100644
|
index 7c22fac3aa04..8cd24da0c6ea 100644
|
||||||
--- a/drivers/gpu/drm/i915/i915_drv.h
|
--- a/drivers/gpu/drm/i915/i915_drv.h
|
||||||
+++ b/drivers/gpu/drm/i915/i915_drv.h
|
+++ b/drivers/gpu/drm/i915/i915_drv.h
|
||||||
@@ -3230,6 +3230,9 @@ void i915_gem_object_do_bit_17_swizzle(struct drm_i915_gem_object *obj,
|
@@ -3222,6 +3222,9 @@ void i915_gem_object_do_bit_17_swizzle(struct drm_i915_gem_object *obj,
|
||||||
void i915_gem_object_save_bit_17_swizzle(struct drm_i915_gem_object *obj,
|
void i915_gem_object_save_bit_17_swizzle(struct drm_i915_gem_object *obj,
|
||||||
struct sg_table *pages);
|
struct sg_table *pages);
|
||||||
|
|
||||||
|
@ -114,7 +185,7 @@ index c16cb025755e..8fb9160d013b 100644
|
||||||
GT_RENDER_USER_INTERRUPT << GEN8_BCS_IRQ_SHIFT |
|
GT_RENDER_USER_INTERRUPT << GEN8_BCS_IRQ_SHIFT |
|
||||||
GT_CONTEXT_SWITCH_INTERRUPT << GEN8_BCS_IRQ_SHIFT,
|
GT_CONTEXT_SWITCH_INTERRUPT << GEN8_BCS_IRQ_SHIFT,
|
||||||
diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
|
diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
|
||||||
index 66ea3552c63e..4f54d74febc8 100644
|
index 66ea3552c63e..b256e8a900af 100644
|
||||||
--- a/drivers/gpu/drm/i915/i915_params.c
|
--- a/drivers/gpu/drm/i915/i915_params.c
|
||||||
+++ b/drivers/gpu/drm/i915/i915_params.c
|
+++ b/drivers/gpu/drm/i915/i915_params.c
|
||||||
@@ -152,7 +152,10 @@ i915_param_named_unsafe(edp_vswing, int, 0400,
|
@@ -152,7 +152,10 @@ i915_param_named_unsafe(edp_vswing, int, 0400,
|
||||||
|
@ -130,7 +201,7 @@ index 66ea3552c63e..4f54d74febc8 100644
|
||||||
i915_param_named(guc_log_level, int, 0400,
|
i915_param_named(guc_log_level, int, 0400,
|
||||||
"GuC firmware logging level. Requires GuC to be loaded. "
|
"GuC firmware logging level. Requires GuC to be loaded. "
|
||||||
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
|
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
|
||||||
index 6684025b7af8..f7f0a63a87e5 100644
|
index 6684025b7af8..ca1128dcebca 100644
|
||||||
--- a/drivers/gpu/drm/i915/i915_params.h
|
--- a/drivers/gpu/drm/i915/i915_params.h
|
||||||
+++ b/drivers/gpu/drm/i915/i915_params.h
|
+++ b/drivers/gpu/drm/i915/i915_params.h
|
||||||
@@ -47,7 +47,7 @@ struct drm_printer;
|
@@ -47,7 +47,7 @@ struct drm_printer;
|
||||||
|
@ -153,10 +224,10 @@ index 6684025b7af8..f7f0a63a87e5 100644
|
||||||
#define MEMBER(T, member, ...) T member;
|
#define MEMBER(T, member, ...) T member;
|
||||||
struct i915_params {
|
struct i915_params {
|
||||||
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
|
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
|
||||||
index 16faea30114a..e5c1e24a6072 100644
|
index 5d6517d37236..0119a4663071 100644
|
||||||
--- a/drivers/gpu/drm/i915/intel_dp.c
|
--- a/drivers/gpu/drm/i915/intel_dp.c
|
||||||
+++ b/drivers/gpu/drm/i915/intel_dp.c
|
+++ b/drivers/gpu/drm/i915/intel_dp.c
|
||||||
@@ -2601,8 +2601,8 @@ void intel_dp_sink_dpms(struct intel_dp *intel_dp, int mode)
|
@@ -2631,8 +2631,8 @@ void intel_dp_sink_dpms(struct intel_dp *intel_dp, int mode)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (mode != DRM_MODE_DPMS_ON) {
|
if (mode != DRM_MODE_DPMS_ON) {
|
||||||
|
@ -180,7 +251,7 @@ index f1265e122d30..1303090a4bd8 100644
|
||||||
struct guc_preempt_work preempt_work[I915_NUM_ENGINES];
|
struct guc_preempt_work preempt_work[I915_NUM_ENGINES];
|
||||||
struct workqueue_struct *preempt_wq;
|
struct workqueue_struct *preempt_wq;
|
||||||
diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
|
diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
|
||||||
index 2feb65096966..1b7b8dc27a28 100644
|
index 2feb65096966..4f8f3845bbe9 100644
|
||||||
--- a/drivers/gpu/drm/i915/intel_guc_submission.c
|
--- a/drivers/gpu/drm/i915/intel_guc_submission.c
|
||||||
+++ b/drivers/gpu/drm/i915/intel_guc_submission.c
|
+++ b/drivers/gpu/drm/i915/intel_guc_submission.c
|
||||||
@@ -94,6 +94,7 @@ static inline bool is_high_priority(struct intel_guc_client *client)
|
@@ -94,6 +94,7 @@ static inline bool is_high_priority(struct intel_guc_client *client)
|
||||||
|
@ -191,7 +262,7 @@ index 2feb65096966..1b7b8dc27a28 100644
|
||||||
unsigned long offset;
|
unsigned long offset;
|
||||||
unsigned long end;
|
unsigned long end;
|
||||||
u16 id;
|
u16 id;
|
||||||
@@ -106,11 +107,16 @@ static int reserve_doorbell(struct intel_guc_client *client)
|
@@ -106,10 +107,15 @@ static int reserve_doorbell(struct intel_guc_client *client)
|
||||||
* priority contexts, the second half for high-priority ones.
|
* priority contexts, the second half for high-priority ones.
|
||||||
*/
|
*/
|
||||||
offset = 0;
|
offset = 0;
|
||||||
|
@ -201,17 +272,16 @@ index 2feb65096966..1b7b8dc27a28 100644
|
||||||
- end += offset;
|
- end += offset;
|
||||||
+ if (IS_SKYLAKE(dev_priv) || IS_KABYLAKE(dev_priv)) {
|
+ if (IS_SKYLAKE(dev_priv) || IS_KABYLAKE(dev_priv)) {
|
||||||
+ end = GUC_NUM_DOORBELLS;
|
+ end = GUC_NUM_DOORBELLS;
|
||||||
}
|
+ }
|
||||||
+ else {
|
+ else {
|
||||||
+ end = GUC_NUM_DOORBELLS/2;
|
+ end = GUC_NUM_DOORBELLS/2;
|
||||||
+ if (is_high_priority(client)) {
|
+ if (is_high_priority(client)) {
|
||||||
+ offset = end;
|
+ offset = end;
|
||||||
+ end += offset;
|
+ end += offset;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
}
|
||||||
|
|
||||||
id = find_next_zero_bit(client->guc->doorbell_bitmap, end, offset);
|
id = find_next_zero_bit(client->guc->doorbell_bitmap, end, offset);
|
||||||
if (id == end)
|
|
||||||
@@ -355,8 +361,14 @@ static void guc_stage_desc_init(struct intel_guc *guc,
|
@@ -355,8 +361,14 @@ static void guc_stage_desc_init(struct intel_guc *guc,
|
||||||
desc = __get_stage_desc(client);
|
desc = __get_stage_desc(client);
|
||||||
memset(desc, 0, sizeof(*desc));
|
memset(desc, 0, sizeof(*desc));
|
||||||
|
@ -986,7 +1056,7 @@ index 000000000000..a6965d102417
|
||||||
+
|
+
|
||||||
+#endif //_INTEL_IPTS_H_
|
+#endif //_INTEL_IPTS_H_
|
||||||
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
|
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
|
||||||
index 7c4c8fb1dae4..88cab775a4d2 100644
|
index 0328ee704ee5..5be61a9a7233 100644
|
||||||
--- a/drivers/gpu/drm/i915/intel_lrc.c
|
--- a/drivers/gpu/drm/i915/intel_lrc.c
|
||||||
+++ b/drivers/gpu/drm/i915/intel_lrc.c
|
+++ b/drivers/gpu/drm/i915/intel_lrc.c
|
||||||
@@ -163,8 +163,6 @@
|
@@ -163,8 +163,6 @@
|
||||||
|
@ -998,7 +1068,7 @@ index 7c4c8fb1dae4..88cab775a4d2 100644
|
||||||
static void execlists_init_reg_state(u32 *reg_state,
|
static void execlists_init_reg_state(u32 *reg_state,
|
||||||
struct i915_gem_context *ctx,
|
struct i915_gem_context *ctx,
|
||||||
struct intel_engine_cs *engine,
|
struct intel_engine_cs *engine,
|
||||||
@@ -1345,7 +1343,7 @@ static int __context_pin(struct i915_gem_context *ctx, struct i915_vma *vma)
|
@@ -1357,7 +1355,7 @@ static int __context_pin(struct i915_gem_context *ctx, struct i915_vma *vma)
|
||||||
return i915_vma_pin(vma, 0, GEN8_LR_CONTEXT_ALIGN, flags);
|
return i915_vma_pin(vma, 0, GEN8_LR_CONTEXT_ALIGN, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1007,7 +1077,7 @@ index 7c4c8fb1dae4..88cab775a4d2 100644
|
||||||
execlists_context_pin(struct intel_engine_cs *engine,
|
execlists_context_pin(struct intel_engine_cs *engine,
|
||||||
struct i915_gem_context *ctx)
|
struct i915_gem_context *ctx)
|
||||||
{
|
{
|
||||||
@@ -1399,7 +1397,7 @@ execlists_context_pin(struct intel_engine_cs *engine,
|
@@ -1411,7 +1409,7 @@ execlists_context_pin(struct intel_engine_cs *engine,
|
||||||
return ERR_PTR(ret);
|
return ERR_PTR(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1016,7 +1086,7 @@ index 7c4c8fb1dae4..88cab775a4d2 100644
|
||||||
struct i915_gem_context *ctx)
|
struct i915_gem_context *ctx)
|
||||||
{
|
{
|
||||||
struct intel_context *ce = to_intel_context(ctx, engine);
|
struct intel_context *ce = to_intel_context(ctx, engine);
|
||||||
@@ -2364,6 +2362,9 @@ int logical_render_ring_init(struct intel_engine_cs *engine)
|
@@ -2376,6 +2374,9 @@ int logical_render_ring_init(struct intel_engine_cs *engine)
|
||||||
|
|
||||||
logical_ring_setup(engine);
|
logical_ring_setup(engine);
|
||||||
|
|
||||||
|
@ -1026,7 +1096,7 @@ index 7c4c8fb1dae4..88cab775a4d2 100644
|
||||||
if (HAS_L3_DPF(dev_priv))
|
if (HAS_L3_DPF(dev_priv))
|
||||||
engine->irq_keep_mask |= GT_RENDER_L3_PARITY_ERROR_INTERRUPT;
|
engine->irq_keep_mask |= GT_RENDER_L3_PARITY_ERROR_INTERRUPT;
|
||||||
|
|
||||||
@@ -2628,7 +2629,7 @@ populate_lr_context(struct i915_gem_context *ctx,
|
@@ -2640,7 +2641,7 @@ populate_lr_context(struct i915_gem_context *ctx,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1085,7 +1155,7 @@ index b443278e569c..4e44ae7c3387 100644
|
||||||
|
|
||||||
static void pch_enable_backlight(const struct intel_crtc_state *crtc_state,
|
static void pch_enable_backlight(const struct intel_crtc_state *crtc_state,
|
||||||
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
|
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
|
||||||
index 45968f7970f8..a0e053c4dc1c 100644
|
index 15c934ef6b18..468710ac7693 100644
|
||||||
--- a/drivers/hid/hid-multitouch.c
|
--- a/drivers/hid/hid-multitouch.c
|
||||||
+++ b/drivers/hid/hid-multitouch.c
|
+++ b/drivers/hid/hid-multitouch.c
|
||||||
@@ -151,6 +151,7 @@ struct mt_device {
|
@@ -151,6 +151,7 @@ struct mt_device {
|
||||||
|
@ -1153,7 +1223,7 @@ index 45968f7970f8..a0e053c4dc1c 100644
|
||||||
|
|
||||||
/* let hid-core decide for the others */
|
/* let hid-core decide for the others */
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1315,6 +1330,7 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi)
|
@@ -1327,6 +1342,7 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi)
|
||||||
suffix = "Pen";
|
suffix = "Pen";
|
||||||
/* force BTN_STYLUS to allow tablet matching in udev */
|
/* force BTN_STYLUS to allow tablet matching in udev */
|
||||||
__set_bit(BTN_STYLUS, hi->input->keybit);
|
__set_bit(BTN_STYLUS, hi->input->keybit);
|
||||||
|
@ -1161,7 +1231,7 @@ index 45968f7970f8..a0e053c4dc1c 100644
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1330,12 +1346,13 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi)
|
@@ -1342,12 +1358,13 @@ static int mt_input_configured(struct hid_device *hdev, struct hid_input *hi)
|
||||||
/* already handled by hid core */
|
/* already handled by hid core */
|
||||||
break;
|
break;
|
||||||
case HID_DG_TOUCHSCREEN:
|
case HID_DG_TOUCHSCREEN:
|
||||||
|
@ -1176,7 +1246,7 @@ index 45968f7970f8..a0e053c4dc1c 100644
|
||||||
break;
|
break;
|
||||||
case HID_VD_ASUS_CUSTOM_MEDIA_KEYS:
|
case HID_VD_ASUS_CUSTOM_MEDIA_KEYS:
|
||||||
suffix = "Custom Media Keys";
|
suffix = "Custom Media Keys";
|
||||||
@@ -1452,6 +1469,7 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
@@ -1464,6 +1481,7 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
||||||
td->cc_index = -1;
|
td->cc_index = -1;
|
||||||
td->scantime_index = -1;
|
td->scantime_index = -1;
|
||||||
td->mt_report_id = -1;
|
td->mt_report_id = -1;
|
||||||
|
@ -1746,7 +1816,7 @@ index 000000000000..03a5f3551ddf
|
||||||
+#endif // _IPTS_GFX_H_
|
+#endif // _IPTS_GFX_H_
|
||||||
diff --git a/drivers/misc/ipts/ipts-hid.c b/drivers/misc/ipts/ipts-hid.c
|
diff --git a/drivers/misc/ipts/ipts-hid.c b/drivers/misc/ipts/ipts-hid.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..3b3be6177648
|
index 000000000000..e85844dc1158
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/misc/ipts/ipts-hid.c
|
+++ b/drivers/misc/ipts/ipts-hid.c
|
||||||
@@ -0,0 +1,456 @@
|
@@ -0,0 +1,456 @@
|
||||||
|
@ -2248,7 +2318,7 @@ index 000000000000..f1b22c912df7
|
||||||
+#endif /* _IPTS_HID_H_ */
|
+#endif /* _IPTS_HID_H_ */
|
||||||
diff --git a/drivers/misc/ipts/ipts-kernel.c b/drivers/misc/ipts/ipts-kernel.c
|
diff --git a/drivers/misc/ipts/ipts-kernel.c b/drivers/misc/ipts/ipts-kernel.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..ca5e24ce579e
|
index 000000000000..86fd359d2eed
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/misc/ipts/ipts-kernel.c
|
+++ b/drivers/misc/ipts/ipts-kernel.c
|
||||||
@@ -0,0 +1,1050 @@
|
@@ -0,0 +1,1050 @@
|
||||||
|
@ -3924,7 +3994,7 @@ index 000000000000..8ca146800a47
|
||||||
+#endif // _IPTS_MEI_MSGS_H_
|
+#endif // _IPTS_MEI_MSGS_H_
|
||||||
diff --git a/drivers/misc/ipts/ipts-mei.c b/drivers/misc/ipts/ipts-mei.c
|
diff --git a/drivers/misc/ipts/ipts-mei.c b/drivers/misc/ipts/ipts-mei.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..39667e75dafd
|
index 000000000000..199e49cb8d70
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/misc/ipts/ipts-mei.c
|
+++ b/drivers/misc/ipts/ipts-mei.c
|
||||||
@@ -0,0 +1,282 @@
|
@@ -0,0 +1,282 @@
|
||||||
|
@ -4212,7 +4282,7 @@ index 000000000000..39667e75dafd
|
||||||
+MODULE_LICENSE("GPL");
|
+MODULE_LICENSE("GPL");
|
||||||
diff --git a/drivers/misc/ipts/ipts-msg-handler.c b/drivers/misc/ipts/ipts-msg-handler.c
|
diff --git a/drivers/misc/ipts/ipts-msg-handler.c b/drivers/misc/ipts/ipts-msg-handler.c
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..1396ecc7197f
|
index 000000000000..8b214f975c03
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/misc/ipts/ipts-msg-handler.c
|
+++ b/drivers/misc/ipts/ipts-msg-handler.c
|
||||||
@@ -0,0 +1,431 @@
|
@@ -0,0 +1,431 @@
|
||||||
|
@ -4649,7 +4719,7 @@ index 000000000000..1396ecc7197f
|
||||||
+}
|
+}
|
||||||
diff --git a/drivers/misc/ipts/ipts-msg-handler.h b/drivers/misc/ipts/ipts-msg-handler.h
|
diff --git a/drivers/misc/ipts/ipts-msg-handler.h b/drivers/misc/ipts/ipts-msg-handler.h
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000000..b8e27d30c63e
|
index 000000000000..15038814dfec
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/misc/ipts/ipts-msg-handler.h
|
+++ b/drivers/misc/ipts/ipts-msg-handler.h
|
||||||
@@ -0,0 +1,32 @@
|
@@ -0,0 +1,32 @@
|
||||||
|
@ -6056,3 +6126,6 @@ index 000000000000..f329bbfb8079
|
||||||
+void intel_ipts_disconnect(uint64_t gfx_handle);
|
+void intel_ipts_disconnect(uint64_t gfx_handle);
|
||||||
+
|
+
|
||||||
+#endif // INTEL_IPTS_IF_H
|
+#endif // INTEL_IPTS_IF_H
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
144
patches/4.18/0006-hid.patch
Normal file
144
patches/4.18/0006-hid.patch
Normal file
|
@ -0,0 +1,144 @@
|
||||||
|
From 756ee28254567d058b3f671451cf2b9652cf88db Mon Sep 17 00:00:00 2001
|
||||||
|
From: qzed <qzed@users.noreply.github.com>
|
||||||
|
Date: Mon, 24 Dec 2018 14:19:55 +0100
|
||||||
|
Subject: [PATCH 6/8] hid
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/hid/hid-ids.h | 20 ++++++++++----
|
||||||
|
drivers/hid/hid-microsoft.c | 3 ++-
|
||||||
|
drivers/hid/hid-multitouch.c | 52 ++++++++++++++++++++++++++++++++++++
|
||||||
|
drivers/hid/hid-quirks.c | 10 +++++++
|
||||||
|
4 files changed, 79 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
||||||
|
index ae5b72269e27..c7ec848f630a 100644
|
||||||
|
--- a/drivers/hid/hid-ids.h
|
||||||
|
+++ b/drivers/hid/hid-ids.h
|
||||||
|
@@ -792,11 +792,21 @@
|
||||||
|
#define USB_DEVICE_ID_MS_DIGITAL_MEDIA_3KV1 0x0732
|
||||||
|
#define USB_DEVICE_ID_MS_DIGITAL_MEDIA_600 0x0750
|
||||||
|
#define USB_DEVICE_ID_MS_COMFORT_MOUSE_4500 0x076c
|
||||||
|
-#define USB_DEVICE_ID_MS_COMFORT_KEYBOARD 0x00e3
|
||||||
|
-#define USB_DEVICE_ID_MS_SURFACE_PRO_2 0x0799
|
||||||
|
-#define USB_DEVICE_ID_MS_TOUCH_COVER_2 0x07a7
|
||||||
|
-#define USB_DEVICE_ID_MS_TYPE_COVER_2 0x07a9
|
||||||
|
-#define USB_DEVICE_ID_MS_POWER_COVER 0x07da
|
||||||
|
+#define USB_DEVICE_ID_MS_COMFORT_KEYBOARD 0x00e3
|
||||||
|
+#define USB_DEVICE_ID_MS_SURFACE_PRO_2 0x0799
|
||||||
|
+#define USB_DEVICE_ID_MS_TOUCH_COVER_2 0x07a7
|
||||||
|
+#define USB_DEVICE_ID_MS_TYPE_COVER_2 0x07a9
|
||||||
|
+#define USB_DEVICE_ID_MS_TYPE_COVER_3 0x07de
|
||||||
|
+#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3 0x07dc
|
||||||
|
+#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_1 0x07de
|
||||||
|
+#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 0x07e2
|
||||||
|
+#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP 0x07dd
|
||||||
|
+#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_4 0x07e8
|
||||||
|
+#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_1 0x07e4
|
||||||
|
+#define USB_DEVICE_ID_MS_SURFACE_BOOK 0x07cd
|
||||||
|
+#define USB_DEVICE_ID_MS_SURFACE_BOOK_2 0x0922
|
||||||
|
+#define USB_DEVICE_ID_MS_SURFACE_VHF 0xf001
|
||||||
|
+#define USB_DEVICE_ID_MS_POWER_COVER 0x07da
|
||||||
|
|
||||||
|
#define USB_VENDOR_ID_MOJO 0x8282
|
||||||
|
#define USB_DEVICE_ID_RETRO_ADAPTER 0x3201
|
||||||
|
diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c
|
||||||
|
index 96e7d3231d2f..36f13a867f0f 100644
|
||||||
|
--- a/drivers/hid/hid-microsoft.c
|
||||||
|
+++ b/drivers/hid/hid-microsoft.c
|
||||||
|
@@ -278,7 +278,8 @@ static const struct hid_device_id ms_devices[] = {
|
||||||
|
.driver_data = MS_HIDINPUT },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_KEYBOARD),
|
||||||
|
.driver_data = MS_ERGONOMY},
|
||||||
|
-
|
||||||
|
+ { HID_DEVICE(BUS_VIRTUAL, 0, USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_VHF),
|
||||||
|
+ .driver_data = MS_HIDINPUT},
|
||||||
|
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_BT),
|
||||||
|
.driver_data = MS_PRESENTER },
|
||||||
|
{ }
|
||||||
|
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
|
||||||
|
index 468710ac7693..130fc1432bc2 100644
|
||||||
|
--- a/drivers/hid/hid-multitouch.c
|
||||||
|
+++ b/drivers/hid/hid-multitouch.c
|
||||||
|
@@ -1769,6 +1769,58 @@ static const struct hid_device_id mt_devices[] = {
|
||||||
|
HID_USB_DEVICE(USB_VENDOR_ID_LG,
|
||||||
|
USB_DEVICE_ID_LG_MELFAS_MT) },
|
||||||
|
|
||||||
|
+ /* Microsoft Touch Cover */
|
||||||
|
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
||||||
|
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
||||||
|
+ USB_DEVICE_ID_MS_TOUCH_COVER_2) },
|
||||||
|
+
|
||||||
|
+ /* Microsoft Type Cover */
|
||||||
|
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
||||||
|
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
||||||
|
+ USB_DEVICE_ID_MS_TYPE_COVER_2) },
|
||||||
|
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
||||||
|
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
||||||
|
+ USB_DEVICE_ID_MS_TYPE_COVER_3) },
|
||||||
|
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
||||||
|
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
||||||
|
+ USB_DEVICE_ID_MS_TYPE_COVER_PRO_3) },
|
||||||
|
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
||||||
|
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
||||||
|
+ USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_1) },
|
||||||
|
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
||||||
|
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
||||||
|
+ USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2) },
|
||||||
|
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
||||||
|
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
||||||
|
+ USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP) },
|
||||||
|
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
||||||
|
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
||||||
|
+ USB_DEVICE_ID_MS_TYPE_COVER_PRO_4) },
|
||||||
|
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
||||||
|
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
||||||
|
+ USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_1) },
|
||||||
|
+
|
||||||
|
+ /* Microsoft Surface Book */
|
||||||
|
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
||||||
|
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
||||||
|
+ USB_DEVICE_ID_MS_SURFACE_BOOK) },
|
||||||
|
+
|
||||||
|
+ /* Microsoft Surface Book 2 */
|
||||||
|
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
||||||
|
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
||||||
|
+ USB_DEVICE_ID_MS_SURFACE_BOOK_2) },
|
||||||
|
+
|
||||||
|
+ /* Microsoft Surface Laptop */
|
||||||
|
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
||||||
|
+ HID_DEVICE(HID_BUS_ANY, HID_GROUP_ANY,
|
||||||
|
+ USB_VENDOR_ID_MICROSOFT,
|
||||||
|
+ USB_DEVICE_ID_MS_SURFACE_VHF) },
|
||||||
|
+
|
||||||
|
+ /* Microsoft Power Cover */
|
||||||
|
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
||||||
|
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
||||||
|
+ USB_DEVICE_ID_MS_POWER_COVER) },
|
||||||
|
+
|
||||||
|
/* MosArt panels */
|
||||||
|
{ .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
|
||||||
|
MT_USB_DEVICE(USB_VENDOR_ID_ASUS,
|
||||||
|
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
|
||||||
|
index 249d49b6b16c..f284f08ba73b 100644
|
||||||
|
--- a/drivers/hid/hid-quirks.c
|
||||||
|
+++ b/drivers/hid/hid-quirks.c
|
||||||
|
@@ -111,6 +111,16 @@ static const struct hid_device_id hid_quirks[] = {
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_PRO_2), HID_QUIRK_NO_INIT_REPORTS },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TOUCH_COVER_2), HID_QUIRK_NO_INIT_REPORTS },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_2), HID_QUIRK_NO_INIT_REPORTS },
|
||||||
|
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3), HID_QUIRK_NO_INIT_REPORTS },
|
||||||
|
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3), HID_QUIRK_NO_INIT_REPORTS },
|
||||||
|
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_1), HID_QUIRK_NO_INIT_REPORTS },
|
||||||
|
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2), HID_QUIRK_NO_INIT_REPORTS },
|
||||||
|
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP), HID_QUIRK_NO_INIT_REPORTS },
|
||||||
|
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4), HID_QUIRK_NO_INIT_REPORTS },
|
||||||
|
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_1), HID_QUIRK_NO_INIT_REPORTS },
|
||||||
|
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_BOOK), HID_QUIRK_NO_INIT_REPORTS },
|
||||||
|
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_BOOK_2), HID_QUIRK_NO_INIT_REPORTS },
|
||||||
|
+ { HID_DEVICE(BUS_VIRTUAL, 0, USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_VHF), HID_QUIRK_ALWAYS_POLL },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_MOJO, USB_DEVICE_ID_RETRO_ADAPTER), HID_QUIRK_MULTI_INPUT },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL), HID_QUIRK_NO_INIT_REPORTS },
|
||||||
|
{ HID_USB_DEVICE(USB_VENDOR_ID_MULTIPLE_1781, USB_DEVICE_ID_RAPHNET_4NES4SNES_OLD), HID_QUIRK_MULTI_INPUT },
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
|
From c9eb294b2f6e5e16c09e2b0b9e43fb1982f2d723 Mon Sep 17 00:00:00 2001
|
||||||
|
From: qzed <qzed@users.noreply.github.com>
|
||||||
|
Date: Mon, 24 Dec 2018 14:20:52 +0100
|
||||||
|
Subject: [PATCH 7/8] sdcard_reader
|
||||||
|
|
||||||
|
---
|
||||||
|
drivers/usb/core/hub.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
|
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
|
||||||
index 1fb266809966..916a323ca79f 100644
|
index 1fb266809966..916a323ca79f 100644
|
||||||
--- a/drivers/usb/core/hub.c
|
--- a/drivers/usb/core/hub.c
|
||||||
|
@ -12,3 +21,6 @@ index 1fb266809966..916a323ca79f 100644
|
||||||
return;
|
return;
|
||||||
|
|
||||||
udev->lpm_disable_count--;
|
udev->lpm_disable_count--;
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
16
patches/4.18/0008-wifi.patch
Normal file
16
patches/4.18/0008-wifi.patch
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
From fcdceb24f246ff4ffebfcced57e8c10d332a2a0c Mon Sep 17 00:00:00 2001
|
||||||
|
From: qzed <qzed@users.noreply.github.com>
|
||||||
|
Date: Mon, 24 Dec 2018 14:21:12 +0100
|
||||||
|
Subject: [PATCH 8/8] wifi
|
||||||
|
|
||||||
|
---
|
||||||
|
scripts/leaking_addresses.pl | 0
|
||||||
|
1 file changed, 0 insertions(+), 0 deletions(-)
|
||||||
|
mode change 100755 => 100644 scripts/leaking_addresses.pl
|
||||||
|
|
||||||
|
diff --git a/scripts/leaking_addresses.pl b/scripts/leaking_addresses.pl
|
||||||
|
old mode 100755
|
||||||
|
new mode 100644
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,555 +0,0 @@
|
||||||
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
|
|
||||||
index c7981ddd8776..914a19b4290a 100644
|
|
||||||
--- a/drivers/hid/hid-ids.h
|
|
||||||
+++ b/drivers/hid/hid-ids.h
|
|
||||||
@@ -793,11 +793,21 @@
|
|
||||||
#define USB_DEVICE_ID_MS_DIGITAL_MEDIA_3KV1 0x0732
|
|
||||||
#define USB_DEVICE_ID_MS_DIGITAL_MEDIA_600 0x0750
|
|
||||||
#define USB_DEVICE_ID_MS_COMFORT_MOUSE_4500 0x076c
|
|
||||||
-#define USB_DEVICE_ID_MS_COMFORT_KEYBOARD 0x00e3
|
|
||||||
-#define USB_DEVICE_ID_MS_SURFACE_PRO_2 0x0799
|
|
||||||
-#define USB_DEVICE_ID_MS_TOUCH_COVER_2 0x07a7
|
|
||||||
-#define USB_DEVICE_ID_MS_TYPE_COVER_2 0x07a9
|
|
||||||
-#define USB_DEVICE_ID_MS_POWER_COVER 0x07da
|
|
||||||
+#define USB_DEVICE_ID_MS_COMFORT_KEYBOARD 0x00e3
|
|
||||||
+#define USB_DEVICE_ID_MS_SURFACE_PRO_2 0x0799
|
|
||||||
+#define USB_DEVICE_ID_MS_TOUCH_COVER_2 0x07a7
|
|
||||||
+#define USB_DEVICE_ID_MS_TYPE_COVER_2 0x07a9
|
|
||||||
+#define USB_DEVICE_ID_MS_TYPE_COVER_3 0x07de
|
|
||||||
+#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3 0x07dc
|
|
||||||
+#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_1 0x07de
|
|
||||||
+#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2 0x07e2
|
|
||||||
+#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP 0x07dd
|
|
||||||
+#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_4 0x07e8
|
|
||||||
+#define USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_1 0x07e4
|
|
||||||
+#define USB_DEVICE_ID_MS_SURFACE_BOOK 0x07cd
|
|
||||||
+#define USB_DEVICE_ID_MS_SURFACE_BOOK_2 0x0922
|
|
||||||
+#define USB_DEVICE_ID_MS_SURFACE_LAPTOP 0xf001
|
|
||||||
+#define USB_DEVICE_ID_MS_POWER_COVER 0x07da
|
|
||||||
|
|
||||||
#define USB_VENDOR_ID_MOJO 0x8282
|
|
||||||
#define USB_DEVICE_ID_RETRO_ADAPTER 0x3201
|
|
||||||
diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c
|
|
||||||
index 96e7d3231d2f..e55097221eec 100644
|
|
||||||
--- a/drivers/hid/hid-microsoft.c
|
|
||||||
+++ b/drivers/hid/hid-microsoft.c
|
|
||||||
@@ -278,7 +278,8 @@ static const struct hid_device_id ms_devices[] = {
|
|
||||||
.driver_data = MS_HIDINPUT },
|
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_COMFORT_KEYBOARD),
|
|
||||||
.driver_data = MS_ERGONOMY},
|
|
||||||
-
|
|
||||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_LAPTOP),
|
|
||||||
+ .driver_data = MS_HIDINPUT},
|
|
||||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_BT),
|
|
||||||
.driver_data = MS_PRESENTER },
|
|
||||||
{ }
|
|
||||||
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
|
|
||||||
index a0e053c4dc1c..5298793b1eaf 100644
|
|
||||||
--- a/drivers/hid/hid-multitouch.c
|
|
||||||
+++ b/drivers/hid/hid-multitouch.c
|
|
||||||
@@ -1754,6 +1754,58 @@ static const struct hid_device_id mt_devices[] = {
|
|
||||||
HID_USB_DEVICE(USB_VENDOR_ID_LG,
|
|
||||||
USB_DEVICE_ID_LG_MELFAS_MT) },
|
|
||||||
|
|
||||||
+ /* Microsoft Touch Cover */
|
|
||||||
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
|
||||||
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
|
||||||
+ USB_DEVICE_ID_MS_TOUCH_COVER_2) },
|
|
||||||
+
|
|
||||||
+ /* Microsoft Type Cover */
|
|
||||||
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
|
||||||
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
|
||||||
+ USB_DEVICE_ID_MS_TYPE_COVER_2) },
|
|
||||||
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
|
||||||
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
|
||||||
+ USB_DEVICE_ID_MS_TYPE_COVER_3) },
|
|
||||||
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
|
||||||
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
|
||||||
+ USB_DEVICE_ID_MS_TYPE_COVER_PRO_3) },
|
|
||||||
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
|
||||||
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
|
||||||
+ USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_1) },
|
|
||||||
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
|
||||||
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
|
||||||
+ USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2) },
|
|
||||||
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
|
||||||
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
|
||||||
+ USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP) },
|
|
||||||
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
|
||||||
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
|
||||||
+ USB_DEVICE_ID_MS_TYPE_COVER_PRO_4) },
|
|
||||||
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
|
||||||
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
|
||||||
+ USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_1) },
|
|
||||||
+
|
|
||||||
+ /* Microsoft Surface Book */
|
|
||||||
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
|
||||||
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
|
||||||
+ USB_DEVICE_ID_MS_SURFACE_BOOK) },
|
|
||||||
+
|
|
||||||
+ /* Microsoft Surface Book 2 */
|
|
||||||
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
|
||||||
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
|
||||||
+ USB_DEVICE_ID_MS_SURFACE_BOOK_2) },
|
|
||||||
+
|
|
||||||
+ /* Microsoft Surface Laptop */
|
|
||||||
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
|
||||||
+ HID_DEVICE(HID_BUS_ANY, HID_GROUP_ANY,
|
|
||||||
+ USB_VENDOR_ID_MICROSOFT,
|
|
||||||
+ USB_DEVICE_ID_MS_SURFACE_LAPTOP) },
|
|
||||||
+
|
|
||||||
+ /* Microsoft Power Cover */
|
|
||||||
+ { .driver_data = MT_CLS_EXPORT_ALL_INPUTS,
|
|
||||||
+ MT_USB_DEVICE(USB_VENDOR_ID_MICROSOFT,
|
|
||||||
+ USB_DEVICE_ID_MS_POWER_COVER) },
|
|
||||||
+
|
|
||||||
/* MosArt panels */
|
|
||||||
{ .driver_data = MT_CLS_CONFIDENCE_MINUS_ONE,
|
|
||||||
MT_USB_DEVICE(USB_VENDOR_ID_ASUS,
|
|
||||||
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
|
|
||||||
index 249d49b6b16c..28fa76011df3 100644
|
|
||||||
--- a/drivers/hid/hid-quirks.c
|
|
||||||
+++ b/drivers/hid/hid-quirks.c
|
|
||||||
@@ -111,6 +111,16 @@ static const struct hid_device_id hid_quirks[] = {
|
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_PRO_2), HID_QUIRK_NO_INIT_REPORTS },
|
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TOUCH_COVER_2), HID_QUIRK_NO_INIT_REPORTS },
|
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_2), HID_QUIRK_NO_INIT_REPORTS },
|
|
||||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_3), HID_QUIRK_NO_INIT_REPORTS },
|
|
||||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3), HID_QUIRK_NO_INIT_REPORTS },
|
|
||||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_1), HID_QUIRK_NO_INIT_REPORTS },
|
|
||||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_2), HID_QUIRK_NO_INIT_REPORTS },
|
|
||||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_3_JP), HID_QUIRK_NO_INIT_REPORTS },
|
|
||||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4), HID_QUIRK_NO_INIT_REPORTS },
|
|
||||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_PRO_4_1), HID_QUIRK_NO_INIT_REPORTS },
|
|
||||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_BOOK), HID_QUIRK_NO_INIT_REPORTS },
|
|
||||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_BOOK_2), HID_QUIRK_NO_INIT_REPORTS },
|
|
||||||
+ { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_SURFACE_LAPTOP), HID_QUIRK_ALWAYS_POLL },
|
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MOJO, USB_DEVICE_ID_RETRO_ADAPTER), HID_QUIRK_MULTI_INPUT },
|
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MSI, USB_DEVICE_ID_MSI_GT683R_LED_PANEL), HID_QUIRK_NO_INIT_REPORTS },
|
|
||||||
{ HID_USB_DEVICE(USB_VENDOR_ID_MULTIPLE_1781, USB_DEVICE_ID_RAPHNET_4NES4SNES_OLD), HID_QUIRK_MULTI_INPUT },
|
|
||||||
diff --git a/drivers/platform/x86/Makefile b/drivers/platform/x86/Makefile
|
|
||||||
index 28c4cede2d91..4afa91fdb4da 100644
|
|
||||||
--- a/drivers/platform/x86/Makefile
|
|
||||||
+++ b/drivers/platform/x86/Makefile
|
|
||||||
@@ -85,6 +85,8 @@ obj-$(CONFIG_SURFACEBOOK2_BUTTON) += surfacebook2_button.o
|
|
||||||
obj-$(CONFIG_ACPI_SURFACE) += surface_acpi.o
|
|
||||||
obj-$(CONFIG_ACPI_SURFACE) += surface_i2c.o
|
|
||||||
obj-$(CONFIG_ACPI_SURFACE) += surface_platform.o
|
|
||||||
+obj-$(CONFIG_ACPI_SURFACE) += surface_vhf.o
|
|
||||||
+obj-$(CONFIG_ACPI_SURFACE) += surface_vhf_keyboard.o
|
|
||||||
obj-$(CONFIG_INTEL_PUNIT_IPC) += intel_punit_ipc.o
|
|
||||||
obj-$(CONFIG_INTEL_BXTWC_PMIC_TMU) += intel_bxtwc_tmu.o
|
|
||||||
obj-$(CONFIG_INTEL_TELEMETRY) += intel_telemetry_core.o \
|
|
||||||
diff --git a/drivers/platform/x86/surface_vhf.c b/drivers/platform/x86/surface_vhf.c
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..2e9f2a670455
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/drivers/platform/x86/surface_vhf.c
|
|
||||||
@@ -0,0 +1,328 @@
|
|
||||||
+/*
|
|
||||||
+ * surface_vhf.c - Microsoft Surface Virtual HID Framework Driver
|
|
||||||
+ *
|
|
||||||
+ * This program is free software; you can redistribute it and/or modify
|
|
||||||
+ * it under the terms of the GNU General Public License as published by
|
|
||||||
+ * the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+ * (at your option) any later version.
|
|
||||||
+ *
|
|
||||||
+ * This program is distributed in the hope that it will be useful,
|
|
||||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ * GNU General Public License for more details.
|
|
||||||
+ *
|
|
||||||
+ * The full GNU General Public License is included in the distribution in
|
|
||||||
+ * the file called "COPYING".
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include <linux/acpi.h>
|
|
||||||
+#include <linux/dmi.h>
|
|
||||||
+#include <linux/device.h>
|
|
||||||
+#include <linux/hid.h>
|
|
||||||
+#include <linux/input.h>
|
|
||||||
+#include <linux/input/sparse-keymap.h>
|
|
||||||
+#include <linux/kernel.h>
|
|
||||||
+#include <linux/module.h>
|
|
||||||
+#include <linux/platform_device.h>
|
|
||||||
+#include <linux/hid-sensor-hub.h>
|
|
||||||
+#include <linux/suspend.h>
|
|
||||||
+#include <linux/clk.h>
|
|
||||||
+#include <linux/errno.h>
|
|
||||||
+#include <linux/init.h>
|
|
||||||
+#include <linux/interrupt.h>
|
|
||||||
+#include <linux/io.h>
|
|
||||||
+#include <linux/irq.h>
|
|
||||||
+#include <linux/pm_wakeup.h>
|
|
||||||
+#include <linux/slab.h>
|
|
||||||
+#include <linux/types.h>
|
|
||||||
+
|
|
||||||
+MODULE_LICENSE("GPL");
|
|
||||||
+MODULE_AUTHOR("Jake Day");
|
|
||||||
+
|
|
||||||
+#define STATUS_REG 0x0C
|
|
||||||
+#define DATA_REG 0x10
|
|
||||||
+#define DATA_AVAIL 0x2
|
|
||||||
+
|
|
||||||
+static const struct acpi_device_id surface_vhf_ids[] = {
|
|
||||||
+ {"MSHW0096", 0},
|
|
||||||
+ {"", 0},
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+struct surface_kbd {
|
|
||||||
+ struct input_dev *input;
|
|
||||||
+ struct resource *res;
|
|
||||||
+ void __iomem *io_base;
|
|
||||||
+ struct clk *clk;
|
|
||||||
+ unsigned short keycodes[256];
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+struct kbd_platform_data {
|
|
||||||
+ const struct matrix_keymap_data *keymap;
|
|
||||||
+ bool rep;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static const struct key_entry surface_vhf_keymap[] = {
|
|
||||||
+ { KE_KEY, 1, { KEY_ESC } },
|
|
||||||
+ { KE_KEY, 2, { KEY_F1 } },
|
|
||||||
+ { KE_KEY, 3, { KEY_F2 } },
|
|
||||||
+ { KE_KEY, 4, { KEY_F3 } },
|
|
||||||
+ { KE_KEY, 5, { KEY_F4 } },
|
|
||||||
+ { KE_KEY, 6, { KEY_F5 } },
|
|
||||||
+ { KE_KEY, 7, { KEY_F6 } },
|
|
||||||
+ { KE_KEY, 8, { KEY_F7 } },
|
|
||||||
+ { KE_KEY, 9, { KEY_F8 } },
|
|
||||||
+ { KE_KEY, 10, { KEY_F9 } },
|
|
||||||
+ { KE_KEY, 11, { KEY_F10 } },
|
|
||||||
+ { KE_KEY, 12, { KEY_F11 } },
|
|
||||||
+ { KE_KEY, 13, { KEY_F12 } },
|
|
||||||
+ { KE_KEY, 14, { KEY_POWER } },
|
|
||||||
+ { KE_KEY, 15, { KEY_DELETE } },
|
|
||||||
+ { KE_KEY, 16, { KEY_GRAVE } },
|
|
||||||
+ { KE_KEY, 17, { KEY_1 } },
|
|
||||||
+ { KE_KEY, 18, { KEY_2 } },
|
|
||||||
+ { KE_KEY, 19, { KEY_3 } },
|
|
||||||
+ { KE_KEY, 20, { KEY_4 } },
|
|
||||||
+ { KE_KEY, 21, { KEY_5 } },
|
|
||||||
+ { KE_KEY, 23, { KEY_6 } },
|
|
||||||
+ { KE_KEY, 23, { KEY_7 } },
|
|
||||||
+ { KE_KEY, 24, { KEY_8 } },
|
|
||||||
+ { KE_KEY, 25, { KEY_9 } },
|
|
||||||
+ { KE_KEY, 26, { KEY_0 } },
|
|
||||||
+ { KE_KEY, 27, { KEY_MINUS } },
|
|
||||||
+ { KE_KEY, 28, { KEY_EQUAL } },
|
|
||||||
+ { KE_KEY, 29, { KEY_BACKSPACE } },
|
|
||||||
+ { KE_KEY, 30, { KEY_TAB } },
|
|
||||||
+ { KE_KEY, 31, { KEY_Q } },
|
|
||||||
+ { KE_KEY, 32, { KEY_W } },
|
|
||||||
+ { KE_KEY, 33, { KEY_E } },
|
|
||||||
+ { KE_KEY, 34, { KEY_R } },
|
|
||||||
+ { KE_KEY, 35, { KEY_T } },
|
|
||||||
+ { KE_KEY, 36, { KEY_Y } },
|
|
||||||
+ { KE_KEY, 37, { KEY_U } },
|
|
||||||
+ { KE_KEY, 38, { KEY_I } },
|
|
||||||
+ { KE_KEY, 39, { KEY_O } },
|
|
||||||
+ { KE_KEY, 40, { KEY_P } },
|
|
||||||
+ { KE_KEY, 41, { KEY_LEFTBRACE } },
|
|
||||||
+ { KE_KEY, 42, { KEY_RIGHTBRACE } },
|
|
||||||
+ { KE_KEY, 43, { KEY_BACKSLASH } },
|
|
||||||
+ { KE_KEY, 44, { KEY_CAPSLOCK } },
|
|
||||||
+ { KE_KEY, 45, { KEY_A } },
|
|
||||||
+ { KE_KEY, 46, { KEY_S } },
|
|
||||||
+ { KE_KEY, 47, { KEY_D } },
|
|
||||||
+ { KE_KEY, 48, { KEY_F } },
|
|
||||||
+ { KE_KEY, 49, { KEY_G } },
|
|
||||||
+ { KE_KEY, 50, { KEY_H } },
|
|
||||||
+ { KE_KEY, 51, { KEY_J } },
|
|
||||||
+ { KE_KEY, 52, { KEY_K } },
|
|
||||||
+ { KE_KEY, 53, { KEY_L } },
|
|
||||||
+ { KE_KEY, 54, { KEY_SEMICOLON } },
|
|
||||||
+ { KE_KEY, 55, { KEY_APOSTROPHE } },
|
|
||||||
+ { KE_KEY, 56, { KEY_ENTER } },
|
|
||||||
+ { KE_KEY, 57, { KEY_LEFTSHIFT } },
|
|
||||||
+ { KE_KEY, 58, { KEY_Z } },
|
|
||||||
+ { KE_KEY, 59, { KEY_X } },
|
|
||||||
+ { KE_KEY, 60, { KEY_C } },
|
|
||||||
+ { KE_KEY, 61, { KEY_V } },
|
|
||||||
+ { KE_KEY, 62, { KEY_B } },
|
|
||||||
+ { KE_KEY, 63, { KEY_N } },
|
|
||||||
+ { KE_KEY, 64, { KEY_M } },
|
|
||||||
+ { KE_KEY, 65, { KEY_COMMA } },
|
|
||||||
+ { KE_KEY, 66, { KEY_DOT } },
|
|
||||||
+ { KE_KEY, 67, { KEY_SLASH } },
|
|
||||||
+ { KE_KEY, 68, { KEY_RIGHTSHIFT } },
|
|
||||||
+ { KE_KEY, 69, { KEY_LEFTCTRL } },
|
|
||||||
+ { KE_KEY, 70, { KEY_FN } },
|
|
||||||
+ { KE_KEY, 71, { KEY_KPASTERISK } },
|
|
||||||
+ { KE_KEY, 72, { KEY_LEFTALT } },
|
|
||||||
+ { KE_KEY, 73, { KEY_SPACE } },
|
|
||||||
+ { KE_KEY, 74, { KEY_RIGHTALT } },
|
|
||||||
+ { KE_KEY, 75, { KEY_MENU } },
|
|
||||||
+ { KE_KEY, 76, { KEY_LEFT } },
|
|
||||||
+ { KE_KEY, 77, { KEY_UP } },
|
|
||||||
+ { KE_KEY, 78, { KEY_DOWN } },
|
|
||||||
+ { KE_KEY, 79, { KEY_RIGHT } },
|
|
||||||
+ { KE_END },
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+static irqreturn_t surface_kbd_interrupt(int irq, void *dev_id)
|
|
||||||
+{
|
|
||||||
+ struct surface_kbd *kbd = dev_id;
|
|
||||||
+ struct input_dev *input = kbd->input;
|
|
||||||
+ unsigned int key;
|
|
||||||
+ u8 sts, val;
|
|
||||||
+
|
|
||||||
+ sts = readb(kbd->io_base + STATUS_REG);
|
|
||||||
+ if (!(sts & DATA_AVAIL))
|
|
||||||
+ return IRQ_NONE;
|
|
||||||
+
|
|
||||||
+ val = readb(kbd->io_base + DATA_REG);
|
|
||||||
+ key = kbd->keycodes[val];
|
|
||||||
+
|
|
||||||
+ input_event(input, EV_MSC, MSC_SCAN, val);
|
|
||||||
+ input_report_key(input, key, 1);
|
|
||||||
+ input_sync(input);
|
|
||||||
+
|
|
||||||
+ writeb(0, kbd->io_base + STATUS_REG);
|
|
||||||
+
|
|
||||||
+ return IRQ_HANDLED;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int surface_vhf_probe(struct platform_device *pdev)
|
|
||||||
+{
|
|
||||||
+ struct resource *res;
|
|
||||||
+ struct surface_kbd *kbd;
|
|
||||||
+ struct input_dev *input_dev;
|
|
||||||
+ int error;
|
|
||||||
+ int ret;
|
|
||||||
+ int irq;
|
|
||||||
+
|
|
||||||
+ pr_info("Surface VHF found\n");
|
|
||||||
+
|
|
||||||
+ pr_info("Surface VHF resources: %u\n", pdev->num_resources);
|
|
||||||
+
|
|
||||||
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
||||||
+ if (!res) {
|
|
||||||
+ dev_err(&pdev->dev, "Surface VHF: No keyboard resource defined\n");
|
|
||||||
+ return -EBUSY;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ irq = platform_get_irq(pdev, 0);
|
|
||||||
+ if (irq < 0) {
|
|
||||||
+ dev_err(&pdev->dev, "not able to get irq for the device\n");
|
|
||||||
+ return irq;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ kbd = kzalloc(sizeof(*kbd), GFP_KERNEL);
|
|
||||||
+ input_dev = input_allocate_device();
|
|
||||||
+ if (!kbd || !input_dev) {
|
|
||||||
+ dev_err(&pdev->dev, "Surface VHF: Out of memory\n");
|
|
||||||
+ error = -ENOMEM;
|
|
||||||
+ goto err_free_mem;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ kbd->input = input_dev;
|
|
||||||
+
|
|
||||||
+ /*kbd->res = request_mem_region(res->start, resource_size(res),
|
|
||||||
+ pdev->name);
|
|
||||||
+ if (!kbd->res) {
|
|
||||||
+ dev_err(&pdev->dev, "keyboard region already claimed\n");
|
|
||||||
+ error = -EBUSY;
|
|
||||||
+ goto err_free_mem;
|
|
||||||
+ }*/
|
|
||||||
+
|
|
||||||
+ kbd->io_base = ioremap(res->start, resource_size(res));
|
|
||||||
+ if (!kbd->io_base) {
|
|
||||||
+ dev_err(&pdev->dev, "Surface VHF: ioremap failed for kbd region\n");
|
|
||||||
+ error = -ENOMEM;
|
|
||||||
+ goto err_release_mem_region;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ kbd->clk = clk_get(&pdev->dev, NULL);
|
|
||||||
+ if (IS_ERR(kbd->clk)) {
|
|
||||||
+ error = PTR_ERR(kbd->clk);
|
|
||||||
+ goto err_iounmap;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ input_dev->name = "Surface Laptop Keyboard";
|
|
||||||
+ input_dev->phys = "keyboard/input0";
|
|
||||||
+ input_dev->dev.parent = &pdev->dev;
|
|
||||||
+ input_dev->id.bustype = BUS_HOST;
|
|
||||||
+ input_dev->id.vendor = 0x045e;
|
|
||||||
+ input_dev->id.product = 0xf001;
|
|
||||||
+ input_dev->id.version = 0x0001;
|
|
||||||
+
|
|
||||||
+ __set_bit(EV_KEY, input_dev->evbit);
|
|
||||||
+ input_set_capability(input_dev, EV_MSC, MSC_SCAN);
|
|
||||||
+
|
|
||||||
+ input_dev->keycode = kbd->keycodes;
|
|
||||||
+ input_dev->keycodesize = sizeof(kbd->keycodes[0]);
|
|
||||||
+ input_dev->keycodemax = ARRAY_SIZE(kbd->keycodes);
|
|
||||||
+
|
|
||||||
+ input_set_drvdata(input_dev, kbd);
|
|
||||||
+
|
|
||||||
+ ret = sparse_keymap_setup(input_dev, surface_vhf_keymap, NULL);
|
|
||||||
+ if (ret)
|
|
||||||
+ return ret;
|
|
||||||
+
|
|
||||||
+ error = request_irq(irq, surface_kbd_interrupt, 0, "keyboard", kbd);
|
|
||||||
+ if (error) {
|
|
||||||
+ dev_err(&pdev->dev, "Surface VHF: Request_irq fail\n");
|
|
||||||
+ goto err_put_clk;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ error = input_register_device(input_dev);
|
|
||||||
+ if (error) {
|
|
||||||
+ dev_err(&pdev->dev, "Surface VHF: Unable to register keyboard device\n");
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ device_init_wakeup(&pdev->dev, 1);
|
|
||||||
+ platform_set_drvdata(pdev, kbd);
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
+/*err_free_irq:
|
|
||||||
+ free_irq(kbd->irq, kbd);*/
|
|
||||||
+err_put_clk:
|
|
||||||
+ clk_put(kbd->clk);
|
|
||||||
+err_iounmap:
|
|
||||||
+ iounmap(kbd->io_base);
|
|
||||||
+err_release_mem_region:
|
|
||||||
+ release_mem_region(res->start, resource_size(res));
|
|
||||||
+err_free_mem:
|
|
||||||
+ input_free_device(input_dev);
|
|
||||||
+ kfree(kbd);
|
|
||||||
+
|
|
||||||
+ return error;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int surface_vhf_remove(struct platform_device *pdev)
|
|
||||||
+{
|
|
||||||
+ device_init_wakeup(&pdev->dev, false);
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static struct platform_driver surface_vhf_driver = {
|
|
||||||
+ .driver = {
|
|
||||||
+ .name = "surface_vhf",
|
|
||||||
+ .acpi_match_table = surface_vhf_ids,
|
|
||||||
+ },
|
|
||||||
+ .probe = surface_vhf_probe,
|
|
||||||
+ .remove = surface_vhf_remove,
|
|
||||||
+};
|
|
||||||
+MODULE_DEVICE_TABLE(acpi, surface_vhf_ids);
|
|
||||||
+
|
|
||||||
+static acpi_status __init
|
|
||||||
+check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)
|
|
||||||
+{
|
|
||||||
+ const struct acpi_device_id *ids = context;
|
|
||||||
+ struct acpi_device *dev;
|
|
||||||
+
|
|
||||||
+ if (acpi_bus_get_device(handle, &dev) != 0)
|
|
||||||
+ return AE_OK;
|
|
||||||
+
|
|
||||||
+ if (acpi_match_device_ids(dev, ids) == 0)
|
|
||||||
+ if (acpi_create_platform_device(dev, NULL))
|
|
||||||
+ dev_info(&dev->dev,
|
|
||||||
+ "Surface VHF: Created platform device\n");
|
|
||||||
+
|
|
||||||
+ return AE_OK;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int __init surface_vhf_init(void)
|
|
||||||
+{
|
|
||||||
+ acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
|
|
||||||
+ ACPI_UINT32_MAX, check_acpi_dev, NULL,
|
|
||||||
+ (void *)surface_vhf_ids, NULL);
|
|
||||||
+
|
|
||||||
+ return platform_driver_register(&surface_vhf_driver);
|
|
||||||
+}
|
|
||||||
+module_init(surface_vhf_init);
|
|
||||||
+
|
|
||||||
+static void __exit surface_vhf_exit(void)
|
|
||||||
+{
|
|
||||||
+ platform_driver_unregister(&surface_vhf_driver);
|
|
||||||
+}
|
|
||||||
+module_exit(surface_vhf_exit);
|
|
||||||
diff --git a/drivers/platform/x86/surface_vhf_keyboard.c b/drivers/platform/x86/surface_vhf_keyboard.c
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..c619d599e4ea
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/drivers/platform/x86/surface_vhf_keyboard.c
|
|
||||||
@@ -0,0 +1,73 @@
|
|
||||||
+/*
|
|
||||||
+ * surface_vhf_keyboard.c - Microsoft Surface Virtual HID Framework Keyboard Device
|
|
||||||
+ *
|
|
||||||
+ * This program is free software; you can redistribute it and/or modify
|
|
||||||
+ * it under the terms of the GNU General Public License as published by
|
|
||||||
+ * the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+ * (at your option) any later version.
|
|
||||||
+ *
|
|
||||||
+ * This program is distributed in the hope that it will be useful,
|
|
||||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+ * GNU General Public License for more details.
|
|
||||||
+ *
|
|
||||||
+ * The full GNU General Public License is included in the distribution in
|
|
||||||
+ * the file called "COPYING".
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#include <linux/acpi.h>
|
|
||||||
+#include <linux/dmi.h>
|
|
||||||
+#include <linux/device.h>
|
|
||||||
+#include <linux/hid.h>
|
|
||||||
+#include <linux/input.h>
|
|
||||||
+#include <linux/input/sparse-keymap.h>
|
|
||||||
+#include <linux/kernel.h>
|
|
||||||
+#include <linux/module.h>
|
|
||||||
+#include <linux/platform_device.h>
|
|
||||||
+#include <linux/hid-sensor-hub.h>
|
|
||||||
+#include <linux/suspend.h>
|
|
||||||
+#include <linux/clk.h>
|
|
||||||
+#include <linux/errno.h>
|
|
||||||
+#include <linux/init.h>
|
|
||||||
+#include <linux/interrupt.h>
|
|
||||||
+#include <linux/io.h>
|
|
||||||
+#include <linux/irq.h>
|
|
||||||
+#include <linux/pm_wakeup.h>
|
|
||||||
+#include <linux/slab.h>
|
|
||||||
+#include <linux/types.h>
|
|
||||||
+
|
|
||||||
+MODULE_LICENSE("GPL");
|
|
||||||
+MODULE_AUTHOR("Jake Day");
|
|
||||||
+
|
|
||||||
+static struct resource surface_vhf_keyboard_resources[] = {
|
|
||||||
+ {
|
|
||||||
+ .start = 0x1a7bbaf9,
|
|
||||||
+ .end = 0x2d356b9e,
|
|
||||||
+ .flags = IORESOURCE_MEM,
|
|
||||||
+ .name = "io-memory"
|
|
||||||
+ },
|
|
||||||
+ {
|
|
||||||
+ .start = 21,
|
|
||||||
+ .end = 21,
|
|
||||||
+ .flags = IORESOURCE_IRQ,
|
|
||||||
+ .name = "irq",
|
|
||||||
+ }
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static struct platform_device surface_vhf_keyboard = {
|
|
||||||
+ .name = "surface_vhf",
|
|
||||||
+ .resource = surface_vhf_keyboard_resources,
|
|
||||||
+ .num_resources = ARRAY_SIZE(surface_vhf_keyboard_resources),
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static int __init surface_hid_init(void)
|
|
||||||
+{
|
|
||||||
+ return platform_device_register(&surface_vhf_keyboard);
|
|
||||||
+}
|
|
||||||
+module_init(surface_hid_init);
|
|
||||||
+
|
|
||||||
+static void __exit surface_hid_exit(void)
|
|
||||||
+{
|
|
||||||
+ platform_device_unregister(&surface_vhf_keyboard);
|
|
||||||
+}
|
|
||||||
+module_exit(surface_hid_exit);
|
|
|
@ -1,3 +0,0 @@
|
||||||
diff --git a/scripts/leaking_addresses.pl b/scripts/leaking_addresses.pl
|
|
||||||
old mode 100755
|
|
||||||
new mode 100644
|
|
Loading…
Reference in a new issue