From da12d5dba1c76936a688864adddb6f065938a71b Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 21 Jul 2023 20:50:10 +0200 Subject: [PATCH] Update v6.4 patches Changes: - Update IPTS - Remove usages of C11 for compatibility with older (Android) kernels - Remove sensor reset during shutdown - Fix compiling resources.c on Android-x86 kernel - Split out HID behaviour for different EDS versions into different files - Fix kernel-doc comments - Add missing docs for members of the device info struct - Drop Intel copyright - Rename doorbell mode to poll mode - Disable the HID interface when the hardware is shutting down See https://github.com/linux-surface/kernel/pull/142 for details - Rebase onto v6.4.4 Links: - kernel: https://github.com/linux-surface/kernel/commit/71ce032167c70b381a3f711bdb212cb6dbb364ce - IPTS: https://github.com/linux-surface/intel-precise-touch/commit/56765da3f87d87c5e5cf09e928abe0f579525e5e --- patches/6.4/0001-surface3-oemb.patch | 2 +- patches/6.4/0002-mwifiex.patch | 6 +- patches/6.4/0003-ath10k.patch | 4 +- patches/6.4/0004-ipts.patch | 1265 ++++++++++++++++++- patches/6.4/0005-ithc.patch | 6 +- patches/6.4/0006-surface-sam-over-hid.patch | 4 +- patches/6.4/0007-surface-button.patch | 4 +- patches/6.4/0008-surface-typecover.patch | 6 +- patches/6.4/0009-surface-shutdown.patch | 4 +- patches/6.4/0010-surface-gpe.patch | 2 +- patches/6.4/0011-cameras.patch | 30 +- patches/6.4/0012-amd-gpio.patch | 4 +- patches/6.4/0013-rtc.patch | 2 +- 13 files changed, 1297 insertions(+), 42 deletions(-) diff --git a/patches/6.4/0001-surface3-oemb.patch b/patches/6.4/0001-surface3-oemb.patch index 122ff9f63..d35a7ef06 100644 --- a/patches/6.4/0001-surface3-oemb.patch +++ b/patches/6.4/0001-surface3-oemb.patch @@ -1,4 +1,4 @@ -From 5e58b7ceec0d77a42fd35878e419e77a930e8dbf Mon Sep 17 00:00:00 2001 +From acce419b2f094acbd2a6c34225a268bd0bd3cca3 Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Sun, 18 Oct 2020 16:42:44 +0900 Subject: [PATCH] (surface3-oemb) add DMI matches for Surface 3 with broken DMI diff --git a/patches/6.4/0002-mwifiex.patch b/patches/6.4/0002-mwifiex.patch index faa020077..f6484b770 100644 --- a/patches/6.4/0002-mwifiex.patch +++ b/patches/6.4/0002-mwifiex.patch @@ -1,4 +1,4 @@ -From c22ce98320199831b7c142f943f51323c9127a1f Mon Sep 17 00:00:00 2001 +From c7b7ff480eda12c17961ae48b2c5ae96850e0092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Tue, 3 Nov 2020 13:28:04 +0100 Subject: [PATCH] mwifiex: Add quirk resetting the PCI bridge on MS Surface @@ -165,7 +165,7 @@ index d6ff964aec5b..5d30ae39d65e 100644 -- 2.41.0 -From ed60891bbb1bd8b719c37e4d6798bdb89d359ed3 Mon Sep 17 00:00:00 2001 +From 9534673337e57f95ce3ceb50e6adc7d224ecfb37 Mon Sep 17 00:00:00 2001 From: Tsuchiya Yuto Date: Sun, 4 Oct 2020 00:11:49 +0900 Subject: [PATCH] mwifiex: pcie: disable bridge_d3 for Surface gen4+ @@ -320,7 +320,7 @@ index 5d30ae39d65e..c14eb56eb911 100644 -- 2.41.0 -From d93a6c751f60fabf280f377732f7084635e1c1ee Mon Sep 17 00:00:00 2001 +From bb9c20f731a8b4bdeeb83250e5eec0d6d9fb5333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Thu, 25 Mar 2021 11:33:02 +0100 Subject: [PATCH] Bluetooth: btusb: Lower passive lescan interval on Marvell diff --git a/patches/6.4/0003-ath10k.patch b/patches/6.4/0003-ath10k.patch index 5adb35889..48c58425c 100644 --- a/patches/6.4/0003-ath10k.patch +++ b/patches/6.4/0003-ath10k.patch @@ -1,4 +1,4 @@ -From eece4cc3f8900799baed625fa8e82ceef9355858 Mon Sep 17 00:00:00 2001 +From 7fa15d4f47bb433bb927fa8a4d931973319d693d Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 27 Feb 2021 00:45:52 +0100 Subject: [PATCH] ath10k: Add module parameters to override board files @@ -20,7 +20,7 @@ Patchset: ath10k 1 file changed, 58 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c -index 5eb131ab916f..67f074a126d1 100644 +index 6cdb225b7eac..19c036751fb1 100644 --- a/drivers/net/wireless/ath/ath10k/core.c +++ b/drivers/net/wireless/ath/ath10k/core.c @@ -38,6 +38,9 @@ static bool fw_diag_log; diff --git a/patches/6.4/0004-ipts.patch b/patches/6.4/0004-ipts.patch index cf941951a..455334522 100644 --- a/patches/6.4/0004-ipts.patch +++ b/patches/6.4/0004-ipts.patch @@ -1,4 +1,4 @@ -From da61f0e02b93d0495ce8563c51b7480f35a6bafd Mon Sep 17 00:00:00 2001 +From 3ec62f7bde89e3c84aae8eac58e5e9a173383d35 Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Thu, 30 Jul 2020 13:21:53 +0200 Subject: [PATCH] misc: mei: Add missing IPTS device IDs @@ -36,7 +36,7 @@ index 676d566f38dd..6b37dd1f8b2a 100644 -- 2.41.0 -From fd9081bd15f1a9daa1d7256112501378ee499321 Mon Sep 17 00:00:00 2001 +From 5969d31250c82992b3e5982bf73723dc685099e4 Mon Sep 17 00:00:00 2001 From: Liban Hannan Date: Tue, 12 Apr 2022 23:31:12 +0100 Subject: [PATCH] iommu: ipts: use IOMMU passthrough mode for IPTS @@ -136,7 +136,7 @@ index b871a6afd803..0d4542b7365d 100644 -- 2.41.0 -From ea8c3ec733d9726343e164157404b5b1b2a0619a Mon Sep 17 00:00:00 2001 +From 5570234ede6474477c2e8445c063f7cfac08c45a Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Sun, 11 Dec 2022 12:00:59 +0100 Subject: [PATCH] hid: Add support for Intel Precise Touch and Stylus @@ -195,7 +195,7 @@ Patchset: ipts create mode 100644 drivers/hid/ipts/thread.h diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig -index 4ce012f83253..7945cb57f531 100644 +index b977450cac75..dcedd5b90f35 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -1316,4 +1316,6 @@ source "drivers/hid/amd-sfh-hid/Kconfig" @@ -2986,7 +2986,7 @@ index 000000000000..a314843599fc -- 2.41.0 -From ebc87e019cb5901338b8db8ec6f191deb9995619 Mon Sep 17 00:00:00 2001 +From e52a30a8f4812f8af1ec6cc5b70e70123be609f1 Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Fri, 28 Apr 2023 15:41:12 +0200 Subject: [PATCH] Update IPTS from module repo @@ -3178,3 +3178,1258 @@ index 6cbb24a8a054..e0c400f420b9 100644 -- 2.41.0 +From 35874dc856b04e0be4fc6e9a18e978640272a46e Mon Sep 17 00:00:00 2001 +From: Dorian Stoll +Date: Mon, 17 Jul 2023 18:10:43 +0200 +Subject: [PATCH] Update IPTS from module repo + +Changes: +* Remove usages of C11 for compatibility with older (Android) kernels +* Remove sensor reset during shutdown +* Fix compiling resources.c on Android-x86 kernel +* Split out HID behaviour for different EDS versions into different files +* Fix kernel-doc comments +* Add missing docs for members of the device info struct +* Drop Intel copyright +* Rename doorbell mode to poll mode +* Disable the HID interface when the hardware is shutting down. + +Based on https://github.com/linux-surface/intel-precise-touch/commit/56765da3f87d87c5e5cf09e928abe0f579525e5e + +Signed-off-by: Dorian Stoll +Patchset: ipts +--- + drivers/hid/ipts/Makefile | 2 + + drivers/hid/ipts/cmd.c | 1 - + drivers/hid/ipts/cmd.h | 7 +- + drivers/hid/ipts/context.h | 3 +- + drivers/hid/ipts/control.c | 25 ++--- + drivers/hid/ipts/control.h | 25 +++-- + drivers/hid/ipts/desc.h | 1 - + drivers/hid/ipts/eds1.c | 103 ++++++++++++++++++ + drivers/hid/ipts/eds1.h | 35 +++++++ + drivers/hid/ipts/eds2.c | 144 ++++++++++++++++++++++++++ + drivers/hid/ipts/eds2.h | 35 +++++++ + drivers/hid/ipts/hid.c | 184 ++++++--------------------------- + drivers/hid/ipts/hid.h | 4 +- + drivers/hid/ipts/main.c | 1 - + drivers/hid/ipts/mei.c | 1 - + drivers/hid/ipts/mei.h | 7 +- + drivers/hid/ipts/receiver.c | 15 +-- + drivers/hid/ipts/receiver.h | 1 - + drivers/hid/ipts/resources.c | 6 +- + drivers/hid/ipts/resources.h | 1 - + drivers/hid/ipts/spec-device.h | 31 +++--- + drivers/hid/ipts/spec-hid.h | 1 - + drivers/hid/ipts/thread.c | 1 - + drivers/hid/ipts/thread.h | 7 +- + 24 files changed, 413 insertions(+), 228 deletions(-) + create mode 100644 drivers/hid/ipts/eds1.c + create mode 100644 drivers/hid/ipts/eds1.h + create mode 100644 drivers/hid/ipts/eds2.c + create mode 100644 drivers/hid/ipts/eds2.h + +diff --git a/drivers/hid/ipts/Makefile b/drivers/hid/ipts/Makefile +index 0fe655bccdc0..883896f68e6a 100644 +--- a/drivers/hid/ipts/Makefile ++++ b/drivers/hid/ipts/Makefile +@@ -6,6 +6,8 @@ + obj-$(CONFIG_HID_IPTS) += ipts.o + ipts-objs := cmd.o + ipts-objs += control.o ++ipts-objs += eds1.o ++ipts-objs += eds2.o + ipts-objs += hid.o + ipts-objs += main.o + ipts-objs += mei.o +diff --git a/drivers/hid/ipts/cmd.c b/drivers/hid/ipts/cmd.c +index 7fd69271ccd5..63a4934bbc5f 100644 +--- a/drivers/hid/ipts/cmd.c ++++ b/drivers/hid/ipts/cmd.c +@@ -1,6 +1,5 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2020-2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +diff --git a/drivers/hid/ipts/cmd.h b/drivers/hid/ipts/cmd.h +index 924758ffee67..2b4079075b64 100644 +--- a/drivers/hid/ipts/cmd.h ++++ b/drivers/hid/ipts/cmd.h +@@ -1,6 +1,5 @@ + /* SPDX-License-Identifier: GPL-2.0-or-later */ + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2020-2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +@@ -19,7 +18,7 @@ + */ + #define IPTS_CMD_DEFAULT_TIMEOUT 1000 + +-/* ++/** + * ipts_cmd_recv_timeout() - Receives a response to a command. + * @ipts: The IPTS driver context. + * @code: The type of the command / response. +@@ -33,7 +32,7 @@ + int ipts_cmd_recv_timeout(struct ipts_context *ipts, enum ipts_command_code code, + struct ipts_response *rsp, u64 timeout); + +-/* ++/** + * ipts_cmd_recv() - Receives a response to a command. + * @ipts: The IPTS driver context. + * @code: The type of the command / response. +@@ -47,7 +46,7 @@ static inline int ipts_cmd_recv(struct ipts_context *ipts, enum ipts_command_cod + return ipts_cmd_recv_timeout(ipts, code, rsp, IPTS_CMD_DEFAULT_TIMEOUT); + } + +-/* ++/** + * ipts_cmd_send() - Executes a command on the device. + * @ipts: The IPTS driver context. + * @code: The type of the command to execute. +diff --git a/drivers/hid/ipts/context.h b/drivers/hid/ipts/context.h +index 3450a95e66ee..ba33259f1f7c 100644 +--- a/drivers/hid/ipts/context.h ++++ b/drivers/hid/ipts/context.h +@@ -1,6 +1,5 @@ + /* SPDX-License-Identifier: GPL-2.0-or-later */ + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2020-2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +@@ -41,7 +40,9 @@ struct ipts_context { + struct ipts_buffer feature_report; + struct ipts_buffer descriptor; + ++ bool hid_active; + struct hid_device *hid; ++ + struct ipts_device_info info; + struct ipts_resources resources; + +diff --git a/drivers/hid/ipts/control.c b/drivers/hid/ipts/control.c +index 2f61500b5119..5360842d260b 100644 +--- a/drivers/hid/ipts/control.c ++++ b/drivers/hid/ipts/control.c +@@ -1,6 +1,5 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2020-2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +@@ -88,6 +87,7 @@ static int ipts_control_set_mode(struct ipts_context *ipts, enum ipts_mode mode) + + static int ipts_control_set_mem_window(struct ipts_context *ipts, struct ipts_resources *res) + { ++ int i = 0; + int ret = 0; + struct ipts_mem_window cmd = { 0 }; + struct ipts_response rsp = { 0 }; +@@ -98,7 +98,7 @@ static int ipts_control_set_mem_window(struct ipts_context *ipts, struct ipts_re + if (!res) + return -EFAULT; + +- for (int i = 0; i < IPTS_BUFFERS; i++) { ++ for (i = 0; i < IPTS_BUFFERS; i++) { + cmd.data_addr_lower[i] = lower_32_bits(res->data[i].dma_address); + cmd.data_addr_upper[i] = upper_32_bits(res->data[i].dma_address); + cmd.feedback_addr_lower[i] = lower_32_bits(res->feedback[i].dma_address); +@@ -342,12 +342,6 @@ int ipts_control_hid2me_feedback(struct ipts_context *ipts, enum ipts_feedback_c + return ipts_control_send_feedback(ipts, IPTS_HID2ME_BUFFER); + } + +-static inline int ipts_control_reset_sensor(struct ipts_context *ipts) +-{ +- return ipts_control_hid2me_feedback(ipts, IPTS_FEEDBACK_CMD_TYPE_SOFT_RESET, +- IPTS_FEEDBACK_DATA_TYPE_VENDOR, NULL, 0); +-} +- + int ipts_control_start(struct ipts_context *ipts) + { + int ret = 0; +@@ -389,9 +383,9 @@ int ipts_control_start(struct ipts_context *ipts) + } + + /* +- * Newer devices can be directly initialized in doorbell mode. ++ * Newer devices can be directly initialized in polling mode. + */ +- ipts->mode = IPTS_MODE_DOORBELL; ++ ipts->mode = IPTS_MODE_POLL; + } + + ret = ipts_control_set_mode(ipts, ipts->mode); +@@ -418,6 +412,8 @@ int ipts_control_start(struct ipts_context *ipts) + return ret; + } + ++ ipts_hid_enable(ipts); ++ + ret = ipts_hid_init(ipts, info); + if (ret) { + dev_err(ipts->dev, "Failed to initialize HID device: %d\n", ret); +@@ -434,6 +430,7 @@ static int _ipts_control_stop(struct ipts_context *ipts) + if (!ipts) + return -EFAULT; + ++ ipts_hid_disable(ipts); + dev_info(ipts->dev, "Stopping IPTS\n"); + + ret = ipts_receiver_stop(ipts); +@@ -442,12 +439,6 @@ static int _ipts_control_stop(struct ipts_context *ipts) + return ret; + } + +- ret = ipts_control_reset_sensor(ipts); +- if (ret) { +- dev_err(ipts->dev, "Failed to reset sensor: %d\n", ret); +- return ret; +- } +- + ret = ipts_resources_free(&ipts->resources); + if (ret) { + dev_err(ipts->dev, "Failed to free resources: %d\n", ret); +@@ -483,7 +474,7 @@ int ipts_control_restart(struct ipts_context *ipts) + return ret; + + /* +- * Give the sensor some time to come back from resetting ++ * Wait a second to give the sensor time to fully shut down. + */ + msleep(1000); + +diff --git a/drivers/hid/ipts/control.h b/drivers/hid/ipts/control.h +index 744bb92d682a..26629c5144ed 100644 +--- a/drivers/hid/ipts/control.h ++++ b/drivers/hid/ipts/control.h +@@ -1,6 +1,5 @@ + /* SPDX-License-Identifier: GPL-2.0-or-later */ + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2020-2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +@@ -15,7 +14,7 @@ + #include "spec-data.h" + #include "spec-device.h" + +-/* ++/** + * ipts_control_request_flush() - Stop the data flow. + * @ipts: The IPTS driver context. + * +@@ -26,7 +25,7 @@ + */ + int ipts_control_request_flush(struct ipts_context *ipts); + +-/* ++/** + * ipts_control_wait_flush() - Wait until data flow has been stopped. + * @ipts: The IPTS driver context. + * +@@ -34,7 +33,7 @@ int ipts_control_request_flush(struct ipts_context *ipts); + */ + int ipts_control_wait_flush(struct ipts_context *ipts); + +-/* ++/** + * ipts_control_wait_flush() - Notify the device that the driver can receive new data. + * @ipts: The IPTS driver context. + * +@@ -42,19 +41,19 @@ int ipts_control_wait_flush(struct ipts_context *ipts); + */ + int ipts_control_request_data(struct ipts_context *ipts); + +-/* ++/** + * ipts_control_wait_data() - Wait until new data is available. + * @ipts: The IPTS driver context. + * @block: Whether to block execution until data is available. + * +- * In doorbell mode, this function will never return while the data flow is active. Instead, +- * the doorbell will be incremented when new data is available. ++ * In poll mode, this function will never return while the data flow is active. Instead, ++ * the poll will be incremented when new data is available. + * + * Returns: 0 on success, <0 on error, -EAGAIN if no data is available. + */ + int ipts_control_wait_data(struct ipts_context *ipts, bool block); + +-/* ++/** + * ipts_control_send_feedback() - Submits a feedback buffer to the device. + * @ipts: The IPTS driver context. + * @buffer: The ID of the buffer containing feedback data. +@@ -63,7 +62,7 @@ int ipts_control_wait_data(struct ipts_context *ipts, bool block); + */ + int ipts_control_send_feedback(struct ipts_context *ipts, u32 buffer); + +-/* ++/** + * ipts_control_hid2me_feedback() - Sends HID2ME feedback, a special type of feedback. + * @ipts: The IPTS driver context. + * @cmd: The command that will be run on the device. +@@ -80,7 +79,7 @@ int ipts_control_send_feedback(struct ipts_context *ipts, u32 buffer); + int ipts_control_hid2me_feedback(struct ipts_context *ipts, enum ipts_feedback_cmd_type cmd, + enum ipts_feedback_data_type type, void *data, size_t size); + +-/* ++/** + * ipts_control_refill_buffer() - Acknowledges that data in a buffer has been processed. + * @ipts: The IPTS driver context. + * @buffer: The buffer that has been processed and can be refilled. +@@ -100,7 +99,7 @@ static inline int ipts_control_refill_buffer(struct ipts_context *ipts, u32 buff + return ipts_control_send_feedback(ipts, buffer); + } + +-/* ++/** + * ipts_control_start() - Initialized the device and starts the data flow. + * @ipts: The IPTS driver context. + * +@@ -108,7 +107,7 @@ static inline int ipts_control_refill_buffer(struct ipts_context *ipts, u32 buff + */ + int ipts_control_start(struct ipts_context *ipts); + +-/* ++/** + * ipts_control_stop() - Stops the data flow and resets the device. + * @ipts: The IPTS driver context. + * +@@ -116,7 +115,7 @@ int ipts_control_start(struct ipts_context *ipts); + */ + int ipts_control_stop(struct ipts_context *ipts); + +-/* ++/** + * ipts_control_restart() - Stops the device and starts it again. + * @ipts: The IPTS driver context. + * +diff --git a/drivers/hid/ipts/desc.h b/drivers/hid/ipts/desc.h +index c058974a03a1..307438c7c80c 100644 +--- a/drivers/hid/ipts/desc.h ++++ b/drivers/hid/ipts/desc.h +@@ -1,6 +1,5 @@ + /* SPDX-License-Identifier: GPL-2.0-or-later */ + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2022-2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +diff --git a/drivers/hid/ipts/eds1.c b/drivers/hid/ipts/eds1.c +new file mode 100644 +index 000000000000..ecbb3a8bdaf6 +--- /dev/null ++++ b/drivers/hid/ipts/eds1.c +@@ -0,0 +1,103 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* ++ * Copyright (c) 2023 Dorian Stoll ++ * ++ * Linux driver for Intel Precise Touch & Stylus ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "context.h" ++#include "control.h" ++#include "desc.h" ++#include "spec-device.h" ++ ++int ipts_eds1_get_descriptor(struct ipts_context *ipts, u8 **desc_buffer, size_t *desc_size) ++{ ++ size_t size = 0; ++ u8 *buffer = NULL; ++ ++ if (!ipts) ++ return -EFAULT; ++ ++ if (!desc_buffer) ++ return -EFAULT; ++ ++ if (!desc_size) ++ return -EFAULT; ++ ++ size = sizeof(ipts_singletouch_descriptor) + sizeof(ipts_fallback_descriptor); ++ ++ buffer = kzalloc(size, GFP_KERNEL); ++ if (!buffer) ++ return -ENOMEM; ++ ++ memcpy(buffer, ipts_singletouch_descriptor, sizeof(ipts_singletouch_descriptor)); ++ memcpy(&buffer[sizeof(ipts_singletouch_descriptor)], ipts_fallback_descriptor, ++ sizeof(ipts_fallback_descriptor)); ++ ++ *desc_size = size; ++ *desc_buffer = buffer; ++ ++ return 0; ++} ++ ++static int ipts_eds1_switch_mode(struct ipts_context *ipts, enum ipts_mode mode) ++{ ++ int ret = 0; ++ ++ if (!ipts) ++ return -EFAULT; ++ ++ if (ipts->mode == mode) ++ return 0; ++ ++ ipts->mode = mode; ++ ++ ret = ipts_control_restart(ipts); ++ if (ret) ++ dev_err(ipts->dev, "Failed to switch modes: %d\n", ret); ++ ++ return ret; ++} ++ ++int ipts_eds1_raw_request(struct ipts_context *ipts, u8 *buffer, size_t size, u8 report_id, ++ enum hid_report_type report_type, enum hid_class_request request_type) ++{ ++ int ret = 0; ++ ++ if (!ipts) ++ return -EFAULT; ++ ++ if (!buffer) ++ return -EFAULT; ++ ++ if (report_id != IPTS_HID_REPORT_SET_MODE) ++ return -EIO; ++ ++ if (report_type != HID_FEATURE_REPORT) ++ return -EIO; ++ ++ if (size != 2) ++ return -EINVAL; ++ ++ /* ++ * Implement mode switching report for older devices without native HID support. ++ */ ++ ++ if (request_type == HID_REQ_GET_REPORT) { ++ memset(buffer, 0, size); ++ buffer[0] = report_id; ++ buffer[1] = ipts->mode; ++ } else if (request_type == HID_REQ_SET_REPORT) { ++ return ipts_eds1_switch_mode(ipts, buffer[1]); ++ } else { ++ return -EIO; ++ } ++ ++ return ret; ++} +diff --git a/drivers/hid/ipts/eds1.h b/drivers/hid/ipts/eds1.h +new file mode 100644 +index 000000000000..eeeb6575e3e8 +--- /dev/null ++++ b/drivers/hid/ipts/eds1.h +@@ -0,0 +1,35 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* ++ * Copyright (c) 2023 Dorian Stoll ++ * ++ * Linux driver for Intel Precise Touch & Stylus ++ */ ++ ++#include ++#include ++ ++#include "context.h" ++ ++/** ++ * ipts_eds1_get_descriptor() - Assembles the HID descriptor of the device. ++ * @ipts: The IPTS driver context. ++ * @desc_buffer: A pointer to the location where the address of the allocated buffer is stored. ++ * @desc_size: A pointer to the location where the size of the allocated buffer is stored. ++ * ++ * Returns: 0 on success, <0 on error. ++ */ ++int ipts_eds1_get_descriptor(struct ipts_context *ipts, u8 **desc_buffer, size_t *desc_size); ++ ++/** ++ * ipts_eds1_raw_request() - Executes an output or feature report on the device. ++ * @ipts: The IPTS driver context. ++ * @buffer: The buffer containing the report. ++ * @size: The size of the buffer. ++ * @report_id: The HID report ID. ++ * @report_type: Whether this report is an output or a feature report. ++ * @request_type: Whether this report requests or sends data. ++ * ++ * Returns: 0 on success, <0 on error. ++ */ ++int ipts_eds1_raw_request(struct ipts_context *ipts, u8 *buffer, size_t size, u8 report_id, ++ enum hid_report_type report_type, enum hid_class_request request_type); +diff --git a/drivers/hid/ipts/eds2.c b/drivers/hid/ipts/eds2.c +new file mode 100644 +index 000000000000..e835b460aa79 +--- /dev/null ++++ b/drivers/hid/ipts/eds2.c +@@ -0,0 +1,144 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* ++ * Copyright (c) 2023 Dorian Stoll ++ * ++ * Linux driver for Intel Precise Touch & Stylus ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "context.h" ++#include "control.h" ++#include "desc.h" ++#include "spec-data.h" ++ ++int ipts_eds2_get_descriptor(struct ipts_context *ipts, u8 **desc_buffer, size_t *desc_size) ++{ ++ size_t size = 0; ++ u8 *buffer = NULL; ++ ++ if (!ipts) ++ return -EFAULT; ++ ++ if (!desc_buffer) ++ return -EFAULT; ++ ++ if (!desc_size) ++ return -EFAULT; ++ ++ size = sizeof(ipts_singletouch_descriptor) + ipts->descriptor.size; ++ ++ buffer = kzalloc(size, GFP_KERNEL); ++ if (!*buffer) ++ return -ENOMEM; ++ ++ memcpy(buffer, ipts_singletouch_descriptor, sizeof(ipts_singletouch_descriptor)); ++ memcpy(&buffer[sizeof(ipts_singletouch_descriptor)], ipts->descriptor.address, ++ ipts->descriptor.size); ++ ++ *desc_size = size; ++ *desc_buffer = buffer; ++ ++ return 0; ++} ++ ++static int ipts_eds2_get_feature(struct ipts_context *ipts, u8 *buffer, size_t size, u8 report_id, ++ enum ipts_feedback_data_type type) ++{ ++ int ret = 0; ++ ++ if (!ipts) ++ return -EFAULT; ++ ++ if (!buffer) ++ return -EFAULT; ++ ++ mutex_lock(&ipts->feature_lock); ++ ++ memset(buffer, 0, size); ++ buffer[0] = report_id; ++ ++ memset(&ipts->feature_report, 0, sizeof(ipts->feature_report)); ++ reinit_completion(&ipts->feature_event); ++ ++ ret = ipts_control_hid2me_feedback(ipts, IPTS_FEEDBACK_CMD_TYPE_NONE, type, buffer, size); ++ if (ret) { ++ dev_err(ipts->dev, "Failed to send hid2me feedback: %d\n", ret); ++ goto out; ++ } ++ ++ ret = wait_for_completion_timeout(&ipts->feature_event, msecs_to_jiffies(5000)); ++ if (ret == 0) { ++ dev_warn(ipts->dev, "GET_FEATURES timed out!\n"); ++ ret = -EIO; ++ goto out; ++ } ++ ++ if (!ipts->feature_report.address) { ++ ret = -EFAULT; ++ goto out; ++ } ++ ++ if (ipts->feature_report.size > size) { ++ ret = -ETOOSMALL; ++ goto out; ++ } ++ ++ ret = ipts->feature_report.size; ++ memcpy(buffer, ipts->feature_report.address, ipts->feature_report.size); ++ ++out: ++ mutex_unlock(&ipts->feature_lock); ++ return ret; ++} ++ ++static int ipts_eds2_set_feature(struct ipts_context *ipts, u8 *buffer, size_t size, u8 report_id, ++ enum ipts_feedback_data_type type) ++{ ++ int ret = 0; ++ ++ if (!ipts) ++ return -EFAULT; ++ ++ if (!buffer) ++ return -EFAULT; ++ ++ buffer[0] = report_id; ++ ++ ret = ipts_control_hid2me_feedback(ipts, IPTS_FEEDBACK_CMD_TYPE_NONE, type, buffer, size); ++ if (ret) ++ dev_err(ipts->dev, "Failed to send hid2me feedback: %d\n", ret); ++ ++ return ret; ++} ++ ++int ipts_eds2_raw_request(struct ipts_context *ipts, u8 *buffer, size_t size, u8 report_id, ++ enum hid_report_type report_type, enum hid_class_request request_type) ++{ ++ enum ipts_feedback_data_type feedback_type = IPTS_FEEDBACK_DATA_TYPE_VENDOR; ++ ++ if (!ipts) ++ return -EFAULT; ++ ++ if (!buffer) ++ return -EFAULT; ++ ++ if (report_type == HID_OUTPUT_REPORT && request_type == HID_REQ_SET_REPORT) ++ feedback_type = IPTS_FEEDBACK_DATA_TYPE_OUTPUT_REPORT; ++ else if (report_type == HID_FEATURE_REPORT && request_type == HID_REQ_GET_REPORT) ++ feedback_type = IPTS_FEEDBACK_DATA_TYPE_GET_FEATURES; ++ else if (report_type == HID_FEATURE_REPORT && request_type == HID_REQ_SET_REPORT) ++ feedback_type = IPTS_FEEDBACK_DATA_TYPE_SET_FEATURES; ++ else ++ return -EIO; ++ ++ if (request_type == HID_REQ_GET_REPORT) ++ return ipts_eds2_get_feature(ipts, buffer, report_id, size, feedback_type); ++ else ++ return ipts_eds2_set_feature(ipts, buffer, report_id, size, feedback_type); ++} +diff --git a/drivers/hid/ipts/eds2.h b/drivers/hid/ipts/eds2.h +new file mode 100644 +index 000000000000..064e3716907a +--- /dev/null ++++ b/drivers/hid/ipts/eds2.h +@@ -0,0 +1,35 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* ++ * Copyright (c) 2023 Dorian Stoll ++ * ++ * Linux driver for Intel Precise Touch & Stylus ++ */ ++ ++#include ++#include ++ ++#include "context.h" ++ ++/** ++ * ipts_eds2_get_descriptor() - Assembles the HID descriptor of the device. ++ * @ipts: The IPTS driver context. ++ * @desc_buffer: A pointer to the location where the address of the allocated buffer is stored. ++ * @desc_size: A pointer to the location where the size of the allocated buffer is stored. ++ * ++ * Returns: 0 on success, <0 on error. ++ */ ++int ipts_eds2_get_descriptor(struct ipts_context *ipts, u8 **desc_buffer, size_t *desc_size); ++ ++/** ++ * ipts_eds2_raw_request() - Executes an output or feature report on the device. ++ * @ipts: The IPTS driver context. ++ * @buffer: The buffer containing the report. ++ * @size: The size of the buffer. ++ * @report_id: The HID report ID. ++ * @report_type: Whether this report is an output or a feature report. ++ * @request_type: Whether this report requests or sends data. ++ * ++ * Returns: 0 on success, <0 on error. ++ */ ++int ipts_eds2_raw_request(struct ipts_context *ipts, u8 *buffer, size_t size, u8 report_id, ++ enum hid_report_type report_type, enum hid_class_request request_type); +diff --git a/drivers/hid/ipts/hid.c b/drivers/hid/ipts/hid.c +index a2471219615b..e34a1a4f9fa7 100644 +--- a/drivers/hid/ipts/hid.c ++++ b/drivers/hid/ipts/hid.c +@@ -1,12 +1,12 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2022-2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus + */ + + #include ++#include + #include + #include + #include +@@ -14,38 +14,30 @@ + #include + + #include "context.h" +-#include "control.h" + #include "desc.h" ++#include "eds1.h" ++#include "eds2.h" + #include "hid.h" + #include "spec-data.h" +-#include "spec-device.h" + #include "spec-hid.h" + +-static int ipts_hid_start(struct hid_device *hid) ++void ipts_hid_enable(struct ipts_context *ipts) + { +- return 0; ++ WRITE_ONCE(ipts->hid_active, true); + } + +-static void ipts_hid_stop(struct hid_device *hid) ++void ipts_hid_disable(struct ipts_context *ipts) + { ++ WRITE_ONCE(ipts->hid_active, false); + } + +-static int ipts_hid_switch_mode(struct ipts_context *ipts, enum ipts_mode mode) ++static int ipts_hid_start(struct hid_device *hid) + { +- if (!ipts) +- return -EFAULT; +- +- if (ipts->mode == mode) +- return 0; +- +- /* +- * This is only allowed on older devices. +- */ +- if (ipts->info.intf_eds > 1) +- return 0; ++ return 0; ++} + +- ipts->mode = mode; +- return ipts_control_restart(ipts); ++static void ipts_hid_stop(struct hid_device *hid) ++{ + } + + static int ipts_hid_parse(struct hid_device *hid) +@@ -53,8 +45,6 @@ static int ipts_hid_parse(struct hid_device *hid) + int ret = 0; + struct ipts_context *ipts = NULL; + +- bool has_native_descriptor = false; +- + u8 *buffer = NULL; + size_t size = 0; + +@@ -66,26 +56,17 @@ static int ipts_hid_parse(struct hid_device *hid) + if (!ipts) + return -EFAULT; + +- size = sizeof(ipts_singletouch_descriptor); +- has_native_descriptor = ipts->descriptor.address && ipts->descriptor.size > 0; ++ if (!READ_ONCE(ipts->hid_active)) ++ return -ENODEV; + +- if (has_native_descriptor) +- size += ipts->descriptor.size; ++ if (ipts->info.intf_eds == 1) ++ ret = ipts_eds1_get_descriptor(ipts, &buffer, &size); + else +- size += sizeof(ipts_fallback_descriptor); +- +- buffer = kzalloc(size, GFP_KERNEL); +- if (!buffer) +- return -ENOMEM; +- +- memcpy(buffer, ipts_singletouch_descriptor, sizeof(ipts_singletouch_descriptor)); ++ ret = ipts_eds2_get_descriptor(ipts, &buffer, &size); + +- if (has_native_descriptor) { +- memcpy(&buffer[sizeof(ipts_singletouch_descriptor)], ipts->descriptor.address, +- ipts->descriptor.size); +- } else { +- memcpy(&buffer[sizeof(ipts_singletouch_descriptor)], ipts_fallback_descriptor, +- sizeof(ipts_fallback_descriptor)); ++ if (ret) { ++ dev_err(ipts->dev, "Failed to allocate HID descriptor: %d\n", ret); ++ return ret; + } + + ret = hid_parse_report(hid, buffer, size); +@@ -99,84 +80,11 @@ static int ipts_hid_parse(struct hid_device *hid) + return 0; + } + +-static int ipts_hid_get_feature(struct ipts_context *ipts, unsigned char reportnum, __u8 *buf, +- size_t size, enum ipts_feedback_data_type type) +-{ +- int ret = 0; +- +- if (!ipts) +- return -EFAULT; +- +- if (!buf) +- return -EFAULT; +- +- mutex_lock(&ipts->feature_lock); +- +- memset(buf, 0, size); +- buf[0] = reportnum; +- +- memset(&ipts->feature_report, 0, sizeof(ipts->feature_report)); +- reinit_completion(&ipts->feature_event); +- +- ret = ipts_control_hid2me_feedback(ipts, IPTS_FEEDBACK_CMD_TYPE_NONE, type, buf, size); +- if (ret) { +- dev_err(ipts->dev, "Failed to send hid2me feedback: %d\n", ret); +- goto out; +- } +- +- ret = wait_for_completion_timeout(&ipts->feature_event, msecs_to_jiffies(5000)); +- if (ret == 0) { +- dev_warn(ipts->dev, "GET_FEATURES timed out!\n"); +- ret = -EIO; +- goto out; +- } +- +- if (!ipts->feature_report.address) { +- ret = -EFAULT; +- goto out; +- } +- +- if (ipts->feature_report.size > size) { +- ret = -ETOOSMALL; +- goto out; +- } +- +- ret = ipts->feature_report.size; +- memcpy(buf, ipts->feature_report.address, ipts->feature_report.size); +- +-out: +- mutex_unlock(&ipts->feature_lock); +- return ret; +-} +- +-static int ipts_hid_set_feature(struct ipts_context *ipts, unsigned char reportnum, __u8 *buf, +- size_t size, enum ipts_feedback_data_type type) +-{ +- int ret = 0; +- +- if (!ipts) +- return -EFAULT; +- +- if (!buf) +- return -EFAULT; +- +- buf[0] = reportnum; +- +- ret = ipts_control_hid2me_feedback(ipts, IPTS_FEEDBACK_CMD_TYPE_NONE, type, buf, size); +- if (ret) +- dev_err(ipts->dev, "Failed to send hid2me feedback: %d\n", ret); +- +- return ret; +-} +- +-static int ipts_hid_raw_request(struct hid_device *hid, unsigned char reportnum, __u8 *buf, +- size_t size, unsigned char rtype, int reqtype) ++static int ipts_hid_raw_request(struct hid_device *hid, unsigned char report_id, __u8 *buffer, ++ size_t size, unsigned char report_type, int request_type) + { +- int ret = 0; + struct ipts_context *ipts = NULL; + +- enum ipts_feedback_data_type type = IPTS_FEEDBACK_DATA_TYPE_VENDOR; +- + if (!hid) + return -ENODEV; + +@@ -185,44 +93,16 @@ static int ipts_hid_raw_request(struct hid_device *hid, unsigned char reportnum, + if (!ipts) + return -EFAULT; + +- if (!buf) +- return -EFAULT; +- +- if (rtype == HID_OUTPUT_REPORT && reqtype == HID_REQ_SET_REPORT) +- type = IPTS_FEEDBACK_DATA_TYPE_OUTPUT_REPORT; +- else if (rtype == HID_FEATURE_REPORT && reqtype == HID_REQ_GET_REPORT) +- type = IPTS_FEEDBACK_DATA_TYPE_GET_FEATURES; +- else if (rtype == HID_FEATURE_REPORT && reqtype == HID_REQ_SET_REPORT) +- type = IPTS_FEEDBACK_DATA_TYPE_SET_FEATURES; +- else +- return -EIO; +- +- // Implemente mode switching report for older devices without native HID support +- if (type == IPTS_FEEDBACK_DATA_TYPE_SET_FEATURES && reportnum == IPTS_HID_REPORT_SET_MODE) { +- ret = ipts_hid_switch_mode(ipts, buf[1]); +- if (ret) { +- dev_err(ipts->dev, "Failed to switch modes: %d\n", ret); +- return ret; +- } +- } +- +- if (reqtype == HID_REQ_GET_REPORT) +- return ipts_hid_get_feature(ipts, reportnum, buf, size, type); +- else +- return ipts_hid_set_feature(ipts, reportnum, buf, size, type); +-} +- +-static int ipts_hid_output_report(struct hid_device *hid, __u8 *data, size_t size) +-{ +- struct ipts_context *ipts = NULL; +- +- if (!hid) ++ if (!READ_ONCE(ipts->hid_active)) + return -ENODEV; + +- ipts = hid->driver_data; +- +- return ipts_control_hid2me_feedback(ipts, IPTS_FEEDBACK_CMD_TYPE_NONE, +- IPTS_FEEDBACK_DATA_TYPE_OUTPUT_REPORT, data, size); ++ if (ipts->info.intf_eds == 1) { ++ return ipts_eds1_raw_request(ipts, buffer, size, report_id, report_type, ++ request_type); ++ } else { ++ return ipts_eds2_raw_request(ipts, buffer, size, report_id, report_type, ++ request_type); ++ } + } + + static struct hid_ll_driver ipts_hid_driver = { +@@ -232,7 +112,6 @@ static struct hid_ll_driver ipts_hid_driver = { + .close = ipts_hid_stop, + .parse = ipts_hid_parse, + .raw_request = ipts_hid_raw_request, +- .output_report = ipts_hid_output_report, + }; + + int ipts_hid_input_data(struct ipts_context *ipts, u32 buffer) +@@ -247,6 +126,9 @@ int ipts_hid_input_data(struct ipts_context *ipts, u32 buffer) + if (!ipts->hid) + return -ENODEV; + ++ if (!READ_ONCE(ipts->hid_active)) ++ return -ENODEV; ++ + header = (struct ipts_data_header *)ipts->resources.data[buffer].address; + + temp = ipts->resources.report.address; +diff --git a/drivers/hid/ipts/hid.h b/drivers/hid/ipts/hid.h +index 62bf3cd48608..1ebe77447903 100644 +--- a/drivers/hid/ipts/hid.h ++++ b/drivers/hid/ipts/hid.h +@@ -1,6 +1,5 @@ + /* SPDX-License-Identifier: GPL-2.0-or-later */ + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2022-2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +@@ -14,6 +13,9 @@ + #include "context.h" + #include "spec-device.h" + ++void ipts_hid_enable(struct ipts_context *ipts); ++void ipts_hid_disable(struct ipts_context *ipts); ++ + int ipts_hid_input_data(struct ipts_context *ipts, u32 buffer); + + int ipts_hid_init(struct ipts_context *ipts, struct ipts_device_info info); +diff --git a/drivers/hid/ipts/main.c b/drivers/hid/ipts/main.c +index 0f20c6c08c38..fb5b5c13ee3e 100644 +--- a/drivers/hid/ipts/main.c ++++ b/drivers/hid/ipts/main.c +@@ -1,6 +1,5 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2020-2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +diff --git a/drivers/hid/ipts/mei.c b/drivers/hid/ipts/mei.c +index 26666fd99b0c..1e0395ceae4a 100644 +--- a/drivers/hid/ipts/mei.c ++++ b/drivers/hid/ipts/mei.c +@@ -1,6 +1,5 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +diff --git a/drivers/hid/ipts/mei.h b/drivers/hid/ipts/mei.h +index eadacae54c40..973bade6b0fd 100644 +--- a/drivers/hid/ipts/mei.h ++++ b/drivers/hid/ipts/mei.h +@@ -1,6 +1,5 @@ + /* SPDX-License-Identifier: GPL-2.0-or-later */ + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +@@ -31,7 +30,7 @@ struct ipts_mei { + struct rw_semaphore message_lock; + }; + +-/* ++/** + * ipts_mei_recv() - Receive data from a MEI device. + * @mei: The IPTS MEI device context. + * @code: The IPTS command code to look for. +@@ -45,7 +44,7 @@ struct ipts_mei { + int ipts_mei_recv(struct ipts_mei *mei, enum ipts_command_code code, struct ipts_response *rsp, + u64 timeout); + +-/* ++/** + * ipts_mei_send() - Send data to a MEI device. + * @ipts: The IPTS MEI device context. + * @data: The data to send. +@@ -55,7 +54,7 @@ int ipts_mei_recv(struct ipts_mei *mei, enum ipts_command_code code, struct ipts + */ + int ipts_mei_send(struct ipts_mei *mei, void *data, size_t length); + +-/* ++/** + * ipts_mei_init() - Initialize the MEI device context. + * @mei: The MEI device context to initialize. + * @cldev: The MEI device the context will be bound to. +diff --git a/drivers/hid/ipts/receiver.c b/drivers/hid/ipts/receiver.c +index f56e9ed32d57..ef66c3c9db80 100644 +--- a/drivers/hid/ipts/receiver.c ++++ b/drivers/hid/ipts/receiver.c +@@ -1,6 +1,5 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2020-2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +@@ -66,7 +65,9 @@ static int ipts_receiver_event_loop(struct ipts_thread *thread) + dev_info(ipts->dev, "IPTS running in event mode\n"); + + while (!ipts_thread_should_stop(thread)) { +- for (int i = 0; i < IPTS_BUFFERS; i++) { ++ int i = 0; ++ ++ for (i = 0; i < IPTS_BUFFERS; i++) { + ret = ipts_control_wait_data(ipts, false); + if (ret == -EAGAIN) + break; +@@ -126,7 +127,7 @@ static int ipts_receiver_event_loop(struct ipts_thread *thread) + return 0; + } + +-static int ipts_receiver_doorbell_loop(struct ipts_thread *thread) ++static int ipts_receiver_poll_loop(struct ipts_thread *thread) + { + int ret = 0; + u32 buffer = 0; +@@ -145,7 +146,7 @@ static int ipts_receiver_doorbell_loop(struct ipts_thread *thread) + if (!ipts) + return -EFAULT; + +- dev_info(ipts->dev, "IPTS running in doorbell mode\n"); ++ dev_info(ipts->dev, "IPTS running in poll mode\n"); + + while (true) { + if (ipts_thread_should_stop(thread)) { +@@ -217,9 +218,9 @@ int ipts_receiver_start(struct ipts_context *ipts) + if (ipts->mode == IPTS_MODE_EVENT) { + ret = ipts_thread_start(&ipts->receiver_loop, ipts_receiver_event_loop, ipts, + "ipts_event"); +- } else if (ipts->mode == IPTS_MODE_DOORBELL) { +- ret = ipts_thread_start(&ipts->receiver_loop, ipts_receiver_doorbell_loop, ipts, +- "ipts_doorbell"); ++ } else if (ipts->mode == IPTS_MODE_POLL) { ++ ret = ipts_thread_start(&ipts->receiver_loop, ipts_receiver_poll_loop, ipts, ++ "ipts_poll"); + } else { + ret = -EINVAL; + } +diff --git a/drivers/hid/ipts/receiver.h b/drivers/hid/ipts/receiver.h +index 96070f34fbca..3de7da62d40c 100644 +--- a/drivers/hid/ipts/receiver.h ++++ b/drivers/hid/ipts/receiver.h +@@ -1,6 +1,5 @@ + /* SPDX-License-Identifier: GPL-2.0-or-later */ + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2020-2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +diff --git a/drivers/hid/ipts/resources.c b/drivers/hid/ipts/resources.c +index 5e924d58c488..cc14653b2a9f 100644 +--- a/drivers/hid/ipts/resources.c ++++ b/drivers/hid/ipts/resources.c +@@ -1,12 +1,12 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2020-2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus + */ + + #include ++#include + #include + + #include "desc.h" +@@ -107,10 +107,6 @@ int ipts_resources_init(struct ipts_resources *res, struct device *dev, size_t d + + int ipts_resources_free(struct ipts_resources *res) + { +- /* +- * Some compilers (AOSP clang) complain about a redefined +- * variable when this is declared inside of the for loop. +- */ + int i = 0; + + if (!res) +diff --git a/drivers/hid/ipts/resources.h b/drivers/hid/ipts/resources.h +index e0c400f420b9..2068e13285f0 100644 +--- a/drivers/hid/ipts/resources.h ++++ b/drivers/hid/ipts/resources.h +@@ -1,6 +1,5 @@ + /* SPDX-License-Identifier: GPL-2.0-or-later */ + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2020-2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +diff --git a/drivers/hid/ipts/spec-device.h b/drivers/hid/ipts/spec-device.h +index 93f673d981f7..41845f9d9025 100644 +--- a/drivers/hid/ipts/spec-device.h ++++ b/drivers/hid/ipts/spec-device.h +@@ -109,14 +109,14 @@ static_assert(sizeof(struct ipts_command) == 324); + + /** + * enum ipts_mode - Configures what data the device produces and how its sent. +- * @IPTS_MODE_EVENT: The device will send an event once a buffer was filled. +- * Older devices will return singletouch data in this mode. +- * @IPTS_MODE_DOORBELL: The device will notify the driver by incrementing the doorbell value. +- * Older devices will return multitouch data in this mode. ++ * @IPTS_MODE_EVENT: The device will send an event once a buffer was filled. ++ * Older devices will return singletouch data in this mode. ++ * @IPTS_MODE_POLL: The device will notify the driver by incrementing the doorbell value. ++ * Older devices will return multitouch data in this mode. + */ + enum ipts_mode { + IPTS_MODE_EVENT = 0x00, +- IPTS_MODE_DOORBELL = 0x01, ++ IPTS_MODE_POLL = 0x01, + }; + + /** +@@ -253,14 +253,19 @@ static_assert(sizeof(struct ipts_response) == 88); + + /** + * struct ipts_device_info - Vendor information of the IPTS device. +- * @vendor: Vendor ID of this device. +- * @product: Product ID of this device. +- * @hw_version: Hardware revision of this device. +- * @fw_version: Firmware revision of this device. +- * @data_size: Requested size for a data buffer. +- * @feedback_size: Requested size for a feedback buffer. +- * @mode: Mode that the device currently operates in. +- * @max_contacts: Maximum amount of concurrent touches the sensor can process. ++ * @vendor: Vendor ID of this device. ++ * @product: Product ID of this device. ++ * @hw_version: Hardware revision of this device. ++ * @fw_version: Firmware revision of this device. ++ * @data_size: Requested size for a data buffer. ++ * @feedback_size: Requested size for a feedback buffer. ++ * @mode: Mode that the device currently operates in. ++ * @max_contacts: Maximum amount of concurrent touches the sensor can process. ++ * @sensor_min_eds: The minimum EDS version supported by the sensor. ++ * @sensor_max_eds: The maximum EDS version supported by the sensor. ++ * @me_min_eds: The minimum EDS version supported by the ME for communicating with the sensor. ++ * @me_max_eds: The maximum EDS version supported by the ME for communicating with the sensor. ++ * @intf_eds: The EDS version implemented by the interface between ME and host. + */ + struct ipts_device_info { + u16 vendor; +diff --git a/drivers/hid/ipts/spec-hid.h b/drivers/hid/ipts/spec-hid.h +index ea70f29ff00c..5a58d4a0a610 100644 +--- a/drivers/hid/ipts/spec-hid.h ++++ b/drivers/hid/ipts/spec-hid.h +@@ -1,6 +1,5 @@ + /* SPDX-License-Identifier: GPL-2.0-or-later */ + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2020-2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +diff --git a/drivers/hid/ipts/thread.c b/drivers/hid/ipts/thread.c +index 8b46f775c107..355e92bea26f 100644 +--- a/drivers/hid/ipts/thread.c ++++ b/drivers/hid/ipts/thread.c +@@ -1,6 +1,5 @@ + // SPDX-License-Identifier: GPL-2.0-or-later + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +diff --git a/drivers/hid/ipts/thread.h b/drivers/hid/ipts/thread.h +index a314843599fc..1f966b8b32c4 100644 +--- a/drivers/hid/ipts/thread.h ++++ b/drivers/hid/ipts/thread.h +@@ -1,6 +1,5 @@ + /* SPDX-License-Identifier: GPL-2.0-or-later */ + /* +- * Copyright (c) 2016 Intel Corporation + * Copyright (c) 2023 Dorian Stoll + * + * Linux driver for Intel Precise Touch & Stylus +@@ -29,7 +28,7 @@ struct ipts_thread { + int (*threadfn)(struct ipts_thread *thread); + }; + +-/* ++/** + * ipts_thread_should_stop() - Returns true if the thread is asked to terminate. + * @thread: The current thread. + * +@@ -37,7 +36,7 @@ struct ipts_thread { + */ + bool ipts_thread_should_stop(struct ipts_thread *thread); + +-/* ++/** + * ipts_thread_start() - Starts an IPTS thread. + * @thread: The thread to initialize and start. + * @threadfn: The function to execute. +@@ -49,7 +48,7 @@ bool ipts_thread_should_stop(struct ipts_thread *thread); + int ipts_thread_start(struct ipts_thread *thread, int (*threadfn)(struct ipts_thread *thread), + void *data, const char name[]); + +-/* ++/** + * ipts_thread_stop() - Asks the thread to terminate and waits until it has finished. + * @thread: The thread that should stop. + * +-- +2.41.0 + diff --git a/patches/6.4/0005-ithc.patch b/patches/6.4/0005-ithc.patch index 11717c743..7507a298a 100644 --- a/patches/6.4/0005-ithc.patch +++ b/patches/6.4/0005-ithc.patch @@ -1,4 +1,4 @@ -From 22887bcb046c16268673c0386fdd9986b0178eee Mon Sep 17 00:00:00 2001 +From cf7f7c5d805020451e1e342a782e4ba15eb18418 Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Sun, 11 Dec 2022 12:03:38 +0100 Subject: [PATCH] iommu: intel: Disable source id verification for ITHC @@ -39,7 +39,7 @@ index a1b987335b31..970805409470 100644 -- 2.41.0 -From ce2c4a772d587cec136e43e18fab8685700e535b Mon Sep 17 00:00:00 2001 +From d2a3c448853fca38e35bdf1cb6dbf364d9566d3c Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Sun, 11 Dec 2022 12:10:54 +0100 Subject: [PATCH] hid: Add support for Intel Touch Host Controller @@ -72,7 +72,7 @@ Patchset: ithc create mode 100644 drivers/hid/ithc/ithc.h diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig -index 7945cb57f531..91e9e4f58c27 100644 +index dcedd5b90f35..847c6b07914d 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig @@ -1318,4 +1318,6 @@ source "drivers/hid/surface-hid/Kconfig" diff --git a/patches/6.4/0006-surface-sam-over-hid.patch b/patches/6.4/0006-surface-sam-over-hid.patch index 34b7cdfc8..40741368f 100644 --- a/patches/6.4/0006-surface-sam-over-hid.patch +++ b/patches/6.4/0006-surface-sam-over-hid.patch @@ -1,4 +1,4 @@ -From bbb9ed13e01e4520c4cb5f68ee849d957ddced15 Mon Sep 17 00:00:00 2001 +From 7577d978fcc77687dfcfd43f865e1be435fe8e39 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 25 Jul 2020 17:19:53 +0200 Subject: [PATCH] i2c: acpi: Implement RawBytes read access @@ -110,7 +110,7 @@ index d6037a328669..a290ebc77aea 100644 -- 2.41.0 -From f9fa5a1f607e9065c5768aa11575acec40f9062b Mon Sep 17 00:00:00 2001 +From 7d307cad9ec30f5bc6a6328bdb4c6a7a78700911 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 13 Feb 2021 16:41:18 +0100 Subject: [PATCH] platform/surface: Add driver for Surface Book 1 dGPU switch diff --git a/patches/6.4/0007-surface-button.patch b/patches/6.4/0007-surface-button.patch index ce860763c..f41155120 100644 --- a/patches/6.4/0007-surface-button.patch +++ b/patches/6.4/0007-surface-button.patch @@ -1,4 +1,4 @@ -From f5394af6a951c9b197de66203f4ec998b321f2f1 Mon Sep 17 00:00:00 2001 +From a4e6ed50788e20e43861683142754bcea9a02244 Mon Sep 17 00:00:00 2001 From: Sachi King Date: Tue, 5 Oct 2021 00:05:09 +1100 Subject: [PATCH] Input: soc_button_array - support AMD variant Surface devices @@ -75,7 +75,7 @@ index e79f5497948b..2bddbe6e9ea4 100644 -- 2.41.0 -From c17de3502b2666b6d2f33b90a9753dc682870622 Mon Sep 17 00:00:00 2001 +From aa4600fd4c3c4e6a6c1e3c46108cd53104982037 Mon Sep 17 00:00:00 2001 From: Sachi King Date: Tue, 5 Oct 2021 00:22:57 +1100 Subject: [PATCH] platform/surface: surfacepro3_button: don't load on amd diff --git a/patches/6.4/0008-surface-typecover.patch b/patches/6.4/0008-surface-typecover.patch index 34cb42858..ccb965069 100644 --- a/patches/6.4/0008-surface-typecover.patch +++ b/patches/6.4/0008-surface-typecover.patch @@ -1,4 +1,4 @@ -From e1cf975d2d22bdf039dc9c6f108f0239f1da86fe Mon Sep 17 00:00:00 2001 +From 465497923177520865a2df581e9421287b3c4039 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 18 Feb 2023 01:02:49 +0100 Subject: [PATCH] USB: quirks: Add USB_QUIRK_DELAY_INIT for Surface Go 3 @@ -39,7 +39,7 @@ index 934b3d997702..2c6604c6e8e1 100644 -- 2.41.0 -From aafc63f7a71c5fa41f3607d5ab86bfa6e247798c Mon Sep 17 00:00:00 2001 +From c610a78c0b50383b8071efd3d4ccfc9d6acce374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Thu, 5 Nov 2020 13:09:45 +0100 Subject: [PATCH] hid/multitouch: Turn off Type Cover keyboard backlight when @@ -272,7 +272,7 @@ index e31be0cb8b85..63fd042aba6b 100644 -- 2.41.0 -From bcf712f57f658a615c4e0fe7e84110c9d3fa1f91 Mon Sep 17 00:00:00 2001 +From f62ce895a748f33b662d93dc6fb65b8c33eef021 Mon Sep 17 00:00:00 2001 From: PJungkamp Date: Fri, 25 Feb 2022 12:04:25 +0100 Subject: [PATCH] hid/multitouch: Add support for surface pro type cover tablet diff --git a/patches/6.4/0009-surface-shutdown.patch b/patches/6.4/0009-surface-shutdown.patch index bd679cba2..0925591cf 100644 --- a/patches/6.4/0009-surface-shutdown.patch +++ b/patches/6.4/0009-surface-shutdown.patch @@ -1,4 +1,4 @@ -From 4e87c419ba748a5074fb14ba10c129a6928b6ba9 Mon Sep 17 00:00:00 2001 +From d229fb6d334f1e368de1407ff651c81404ee2706 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sun, 19 Feb 2023 22:12:24 +0100 Subject: [PATCH] PCI: Add quirk to prevent calling shutdown mehtod @@ -81,7 +81,7 @@ index c525867760bf..b67d9181a608 100644 +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x466d, quirk_no_shutdown); // Thunderbolt 4 NHI +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x46a8, quirk_no_shutdown); // GPU diff --git a/include/linux/pci.h b/include/linux/pci.h -index 60b8772b5bd4..cc07be9c7e37 100644 +index c69a2cc1f412..a23262cfc9b7 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -464,6 +464,7 @@ struct pci_dev { diff --git a/patches/6.4/0010-surface-gpe.patch b/patches/6.4/0010-surface-gpe.patch index 457e1b9ee..f016c5169 100644 --- a/patches/6.4/0010-surface-gpe.patch +++ b/patches/6.4/0010-surface-gpe.patch @@ -1,4 +1,4 @@ -From f5478c80a7634c142f58479840afc98e61f13816 Mon Sep 17 00:00:00 2001 +From 46eccda64d185e04a4efe90088321babb4f9420c Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sun, 12 Mar 2023 01:41:57 +0100 Subject: [PATCH] platform/surface: gpe: Add support for Surface Pro 9 diff --git a/patches/6.4/0011-cameras.patch b/patches/6.4/0011-cameras.patch index b851ac6e9..cf5bab12c 100644 --- a/patches/6.4/0011-cameras.patch +++ b/patches/6.4/0011-cameras.patch @@ -1,4 +1,4 @@ -From cf88b8ced271de9d55f8a1c777ce083b1c0cd482 Mon Sep 17 00:00:00 2001 +From f89adc21a1c83e91154d428e0f21faf32060c664 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sun, 10 Oct 2021 20:56:57 +0200 Subject: [PATCH] ACPI: delay enumeration of devices with a _DEP pointing to an @@ -74,7 +74,7 @@ index 0c6f06abe3f4..4fc320f424e8 100644 -- 2.41.0 -From 502d2d98a73bb12cdb210ae2567891972c4d4931 Mon Sep 17 00:00:00 2001 +From 5e9fe5076e448791b9f254dff8b214ca88ee951e Mon Sep 17 00:00:00 2001 From: zouxiaoh Date: Fri, 25 Jun 2021 08:52:59 +0800 Subject: [PATCH] iommu: intel-ipu: use IOMMU passthrough mode for Intel IPUs @@ -191,7 +191,7 @@ index 0d4542b7365d..c96a9baea21c 100644 -- 2.41.0 -From 8e9074cf5e94a47cc001868207c84876ac803fea Mon Sep 17 00:00:00 2001 +From de3638044ccff36a2e9012cbb2e1eb79ead25904 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Sun, 10 Oct 2021 20:57:02 +0200 Subject: [PATCH] platform/x86: int3472: Enable I2c daisy chain @@ -228,7 +228,7 @@ index 5b8d1a9620a5..6a0ff035cf20 100644 -- 2.41.0 -From 2b8b133824f99760a28758e2879c86248a221d8a Mon Sep 17 00:00:00 2001 +From a599b3cc70978eba66dcc10673ff9c38ca0f931c Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Wed, 4 May 2022 23:21:45 +0100 Subject: [PATCH] media: ipu3-cio2: Move functionality from .complete() to @@ -343,7 +343,7 @@ index 3c84cb121632..8ba5f78baf9c 100644 -- 2.41.0 -From 4459a5f6408147c79442d0a785221fbf1131a6ac Mon Sep 17 00:00:00 2001 +From c88a69dcaeba7fd8a19ba1e6b77ad35dd189a69d Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Thu, 2 Jun 2022 22:15:56 +0100 Subject: [PATCH] media: ipu3-cio2: Re-add .complete() to ipu3-cio2 @@ -386,7 +386,7 @@ index 8ba5f78baf9c..f0b77012641b 100644 -- 2.41.0 -From a7797b5b383a07e06c2ced41ec7e9b719e73392e Mon Sep 17 00:00:00 2001 +From cb8a7d4683336c610c55b867f78c9820571a6956 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Thu, 28 Oct 2021 21:55:16 +0100 Subject: [PATCH] media: i2c: Add driver for DW9719 VCM @@ -423,7 +423,7 @@ index 35e19594640d..7e6631f0b55b 100644 M: Dongchun Zhu L: linux-media@vger.kernel.org diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig -index 256d55bb2b1d..c9587f500a88 100644 +index 76d1ee3cc1ba..f5d036164db9 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -835,6 +835,17 @@ config VIDEO_DW9714 @@ -890,7 +890,7 @@ index 000000000000..180b04d2a6b3 -- 2.41.0 -From 66226798295760439acb818060adf50ea3704866 Mon Sep 17 00:00:00 2001 +From bbc6cec9c79b3bdb990d7e3c92961628009bad7c Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Fri, 15 Jul 2022 23:48:00 +0200 Subject: [PATCH] drivers/media/i2c: Fix DW9719 dependencies @@ -904,7 +904,7 @@ Patchset: cameras 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig -index c9587f500a88..0e5a69d5d7ff 100644 +index f5d036164db9..cf6919f73347 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -837,7 +837,7 @@ config VIDEO_DW9714 @@ -919,7 +919,7 @@ index c9587f500a88..0e5a69d5d7ff 100644 -- 2.41.0 -From 2bf3a742b27b978243dcf61508224c49205c66a8 Mon Sep 17 00:00:00 2001 +From 20524f765c12feb0a369491af8499341b0f9f6b8 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Thu, 2 Mar 2023 12:59:39 +0000 Subject: [PATCH] platform/x86: int3472: Remap reset GPIO for INT347E @@ -975,7 +975,7 @@ index ef020e23e596..d21ef437c2f6 100644 -- 2.41.0 -From f9bda3b580555ebed83e8b9d4a005953f11639a2 Mon Sep 17 00:00:00 2001 +From fb762a0d5b7b2391bdf427c6b9e3d5483b79c148 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Tue, 21 Mar 2023 13:45:26 +0000 Subject: [PATCH] media: i2c: Clarify that gain is Analogue gain in OV7251 @@ -1014,7 +1014,7 @@ index 88e987435285..ff7b2c26da83 100644 -- 2.41.0 -From 4de0280de0b911546bdc8f462805da75d5afa9f7 Mon Sep 17 00:00:00 2001 +From 2cf2787334fbb2399143168ff32dc5d92a87dd73 Mon Sep 17 00:00:00 2001 From: Daniel Scally Date: Wed, 22 Mar 2023 11:01:42 +0000 Subject: [PATCH] media: v4l2-core: Acquire privacy led in @@ -1065,7 +1065,7 @@ index 049c2f2001ea..f8c3e40b2b71 100644 -- 2.41.0 -From 39c65419dcb12ee39425ac8231056b2764de9cb0 Mon Sep 17 00:00:00 2001 +From 57a022e8d9eb1facb575e98e20e7507f659581e6 Mon Sep 17 00:00:00 2001 From: Kate Hsuan Date: Tue, 21 Mar 2023 23:37:16 +0800 Subject: [PATCH] platform: x86: int3472: Add MFD cell for tps68470 LED @@ -1106,7 +1106,7 @@ index 6a0ff035cf20..2a7d01d3abc8 100644 -- 2.41.0 -From 699ed94263c16719bc0dc36e2eae7a37be89a9f1 Mon Sep 17 00:00:00 2001 +From 11f61ac7d5cc7ca935298549701063af7dff7a5e Mon Sep 17 00:00:00 2001 From: Kate Hsuan Date: Tue, 21 Mar 2023 23:37:17 +0800 Subject: [PATCH] include: mfd: tps68470: Add masks for LEDA and LEDB @@ -1147,7 +1147,7 @@ index 7807fa329db0..2d2abb25b944 100644 -- 2.41.0 -From 77fa5dd16e40d64a5a286a24a24e8d558ac14308 Mon Sep 17 00:00:00 2001 +From db754c6132011dbce4559410f4bc1de09f0468f7 Mon Sep 17 00:00:00 2001 From: Kate Hsuan Date: Tue, 21 Mar 2023 23:37:18 +0800 Subject: [PATCH] leds: tps68470: Add LED control for tps68470 diff --git a/patches/6.4/0012-amd-gpio.patch b/patches/6.4/0012-amd-gpio.patch index 94bd0b976..151852ba0 100644 --- a/patches/6.4/0012-amd-gpio.patch +++ b/patches/6.4/0012-amd-gpio.patch @@ -1,4 +1,4 @@ -From 35e92db3bbc48f7ed21a12176cc735cac34d0640 Mon Sep 17 00:00:00 2001 +From e4cfaa0d5f88a2d91e1580a88690e98d555dcd64 Mon Sep 17 00:00:00 2001 From: Sachi King Date: Sat, 29 May 2021 17:47:38 +1000 Subject: [PATCH] ACPI: Add quirk for Surface Laptop 4 AMD missing irq 7 @@ -65,7 +65,7 @@ index 21b542a6866c..fdd602e640b5 100644 -- 2.41.0 -From af8bc8ccc9017671ae0240ddf1602981b0828fd6 Mon Sep 17 00:00:00 2001 +From 6bb3a4c5fc6106acc28fd166a503b1ff75a30800 Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Thu, 3 Jun 2021 14:04:26 +0200 Subject: [PATCH] ACPI: Add AMD 13" Surface Laptop 4 model to irq 7 override diff --git a/patches/6.4/0013-rtc.patch b/patches/6.4/0013-rtc.patch index bfa9670ab..0490a26d6 100644 --- a/patches/6.4/0013-rtc.patch +++ b/patches/6.4/0013-rtc.patch @@ -1,4 +1,4 @@ -From bb78b890618ace48326df941db557d54bb5d641f Mon Sep 17 00:00:00 2001 +From 387dd24d99c519b20986d9b9f1779ddb48270d08 Mon Sep 17 00:00:00 2001 From: "Bart Groeneveld | GPX Solutions B.V" Date: Mon, 5 Dec 2022 16:08:46 +0100 Subject: [PATCH] acpi: allow usage of acpi_tad on HW-reduced platforms