Update v5.10 patches

Changes:
 - SAM:
   - Add support for Surface Pro 7+
   - Minor updates and fixes.

 - IPTS:
   - Send commands during shutdown again, this is needed on some devices
     and readds the dependency on the MEI bus patch
   - Flush buffers during shutdown, to prevent a timeout from CLEAR_MEM_WINDOW
   - Added initial support for setting gen7 devices into multitouch

 - Add firmware file override for ath10k wifi driver.

Links:
 - kernel: 2315b7e5cb
 - SAM: a8b786bd6f
 - IPTS: 90de2d6e75
This commit is contained in:
Maximilian Luz 2021-03-09 20:43:48 +01:00
parent e8c31f66dd
commit f612a01bb5
No known key found for this signature in database
GPG key ID: 70EC0937F6C26F02
11 changed files with 530 additions and 287 deletions

View file

@ -1,4 +1,4 @@
From 22340c14d342f06a997d3b5a89af9346de0a7435 Mon Sep 17 00:00:00 2001
From 08f96d77d331139d67c7b5f8ff292a3b2ccbe54e Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Sun, 18 Oct 2020 16:42:44 +0900
Subject: [PATCH] (surface3-oemb) add DMI matches for Surface 3 with broken DMI

View file

@ -1,4 +1,4 @@
From 7b93499e4902acda6934cfb5f959f5e94e7f8044 Mon Sep 17 00:00:00 2001
From 991c024a6ff5d7587f619f2fac62f3c11d3625d5 Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Thu, 24 Sep 2020 18:02:06 +0900
Subject: [PATCH] mwifiex: pcie: skip cancel_work_sync() on reset failure path
@ -156,7 +156,7 @@ index 843d57eda820..5ed613d65709 100644
--
2.30.1
From f5aa70330a4efb8cf636143ef9aa7e4904ad5127 Mon Sep 17 00:00:00 2001
From 28749ed558d68bcd6332217911aa8f96dfaf5da7 Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Mon, 28 Sep 2020 17:46:49 +0900
Subject: [PATCH] mwifiex: pcie: add DMI-based quirk impl for Surface devices
@ -364,7 +364,7 @@ index 000000000000..5326ae7e5671
--
2.30.1
From 24b69b7365838ea8b0d5f82ad3f180fa090012ed Mon Sep 17 00:00:00 2001
From bbf7ac5f973613a842c8a6660f611397e121748d Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Tue, 29 Sep 2020 17:25:22 +0900
Subject: [PATCH] mwifiex: pcie: add reset_d3cold quirk for Surface gen4+
@ -565,7 +565,7 @@ index 5326ae7e5671..8b9dcb5070d8 100644
--
2.30.1
From 874ad16a7ebce9ad8c0e35108b9f2b2f0acb6356 Mon Sep 17 00:00:00 2001
From 1bd851eea10c8b8d9735132ddb6c73f0f604565c Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Tue, 29 Sep 2020 17:32:22 +0900
Subject: [PATCH] mwifiex: pcie: add reset_wsid quirk for Surface 3
@ -744,7 +744,7 @@ index 8b9dcb5070d8..3ef7440418e3 100644
--
2.30.1
From fa1e5b2ce0632c6b9d95c7f6cd0b24791b5c9365 Mon Sep 17 00:00:00 2001
From 65e0f315f36d071afd5794e17c1d5fdaa916c419 Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Wed, 30 Sep 2020 18:08:24 +0900
Subject: [PATCH] mwifiex: pcie: (OEMB) add quirk for Surface 3 with broken DMI
@ -806,7 +806,7 @@ index f0a6fa0a7ae5..34dcd84f02a6 100644
--
2.30.1
From 919301a63938bca88969a454f0abdc3db27f1ad3 Mon Sep 17 00:00:00 2001
From 5cbbcbde496089e0c6f93db1792676b9460bfe54 Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Thu, 24 Sep 2020 01:56:34 +0900
Subject: [PATCH] mwifiex: pcie: use shutdown_sw()/reinit_sw() on
@ -948,7 +948,7 @@ index 94561ddaf126..7b25335f1df3 100644
--
2.30.1
From ebac0bf11dff3fa948916a759bae904fd960d05b Mon Sep 17 00:00:00 2001
From 671abd130867929cc77428567bdeeffc9a7f5a98 Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Mon, 24 Aug 2020 17:11:35 +0900
Subject: [PATCH] mwifiex: pcie: add enable_device_dump module parameter
@ -997,7 +997,7 @@ index 7b25335f1df3..f7e0b86eb553 100644
--
2.30.1
From 142fdbb7737b947c70e064ba916d24e895d8cb2a Mon Sep 17 00:00:00 2001
From f8b11cefb4af47fbe88760baca18bc4a21b72266 Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Sun, 4 Oct 2020 00:11:49 +0900
Subject: [PATCH] mwifiex: pcie: disable bridge_d3 for Surface gen4+
@ -1152,7 +1152,7 @@ index 3ef7440418e3..a95ebac06e13 100644
--
2.30.1
From c0e83e93479fc6f348e1ec300412cc0971cc0427 Mon Sep 17 00:00:00 2001
From 2fd452d9ccfa37dd8b555194973933bdaca27f79 Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Sun, 4 Oct 2020 00:25:48 +0900
Subject: [PATCH] mwifiex: add allow_ps_mode module parameter
@ -1214,7 +1214,7 @@ index a6b9dc6700b1..943bc1e8ceae 100644
--
2.30.1
From 189cb0a5ea576d49e36b52ecf8316a2ceb5361c8 Mon Sep 17 00:00:00 2001
From 8fea1122e006985576a1d1961a62a8066b5de9f5 Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Sun, 4 Oct 2020 00:38:48 +0900
Subject: [PATCH] mwifiex: print message when changing ps_mode
@ -1249,7 +1249,7 @@ index 943bc1e8ceae..a2eb8df8d385 100644
--
2.30.1
From d56d58a5b0ee3636946447789c88ce474b7b1006 Mon Sep 17 00:00:00 2001
From ed0baff5e9154ff7fa185a8460941aad031cb9df Mon Sep 17 00:00:00 2001
From: Tsuchiya Yuto <kitakar@gmail.com>
Date: Sun, 4 Oct 2020 00:59:37 +0900
Subject: [PATCH] mwifiex: disable ps_mode explicitly by default instead

View file

@ -1,4 +1,4 @@
From da1f68432e7f4aaf42d07ac2a84d379cd1de4f4c Mon Sep 17 00:00:00 2001
From 9aeb7af9e28a7db4bbb2e15a9b3f122673002263 Mon Sep 17 00:00:00 2001
From: Dorian Stoll <dorian.stoll@tmsp.io>
Date: Thu, 30 Jul 2020 13:21:53 +0200
Subject: [PATCH] misc: mei: Add missing IPTS device IDs
@ -10,7 +10,7 @@ Patchset: ipts
2 files changed, 2 insertions(+)
diff --git a/drivers/misc/mei/hw-me-regs.h b/drivers/misc/mei/hw-me-regs.h
index 9cf8d8f60cfe..ca2d4faff6a2 100644
index 14be76d4c2e6..6cfdbedd9b13 100644
--- a/drivers/misc/mei/hw-me-regs.h
+++ b/drivers/misc/mei/hw-me-regs.h
@@ -92,6 +92,7 @@
@ -22,7 +22,7 @@ index 9cf8d8f60cfe..ca2d4faff6a2 100644
#define MEI_DEV_ID_JSP_N 0x4DE0 /* Jasper Lake Point N */
diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
index 1de9ef7a272b..e12484840f88 100644
index a7e179626b63..fdcc0eedc49f 100644
--- a/drivers/misc/mei/pci-me.c
+++ b/drivers/misc/mei/pci-me.c
@@ -96,6 +96,7 @@ static const struct pci_device_id mei_me_pci_tbl[] = {
@ -36,7 +36,36 @@ index 1de9ef7a272b..e12484840f88 100644
--
2.30.1
From 8dacfcecc5c09994fbc750d50e063a5e2db72c65 Mon Sep 17 00:00:00 2001
From d07e2293d6df5798e6dc0a91fcd4b1bdb387bd13 Mon Sep 17 00:00:00 2001
From: Dorian Stoll <dorian.stoll@tmsp.io>
Date: Thu, 25 Feb 2021 09:37:47 +0100
Subject: [PATCH] misc: mei: Remove client devices before shutting down bus
Patchset: ipts
---
drivers/misc/mei/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index bcee77768b91..21ed765003e1 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -302,10 +302,10 @@ void mei_stop(struct mei_device *dev)
{
dev_dbg(dev->dev, "stopping the device.\n");
+ mei_cl_bus_remove_devices(dev);
mutex_lock(&dev->device_lock);
mei_set_devstate(dev, MEI_DEV_POWER_DOWN);
mutex_unlock(&dev->device_lock);
- mei_cl_bus_remove_devices(dev);
mei_cancel_work(dev);
--
2.30.1
From cde2085247984957e783a754a2d75f253516d891 Mon Sep 17 00:00:00 2001
From: Dorian Stoll <dorian.stoll@tmsp.io>
Date: Thu, 6 Aug 2020 11:20:41 +0200
Subject: [PATCH] misc: Add support for Intel Precise Touch & Stylus
@ -50,18 +79,18 @@ Patchset: ipts
drivers/misc/Makefile | 1 +
drivers/misc/ipts/Kconfig | 17 ++
drivers/misc/ipts/Makefile | 12 ++
drivers/misc/ipts/context.h | 47 ++++++
drivers/misc/ipts/control.c | 76 +++++++++
drivers/misc/ipts/control.h | 22 +++
drivers/misc/ipts/mei.c | 118 ++++++++++++++
drivers/misc/ipts/protocol.h | 284 ++++++++++++++++++++++++++++++++++
drivers/misc/ipts/receiver.c | 188 ++++++++++++++++++++++
drivers/misc/ipts/context.h | 47 +++++
drivers/misc/ipts/control.c | 113 +++++++++++
drivers/misc/ipts/control.h | 24 +++
drivers/misc/ipts/mei.c | 127 +++++++++++++
drivers/misc/ipts/protocol.h | 347 ++++++++++++++++++++++++++++++++++
drivers/misc/ipts/receiver.c | 224 ++++++++++++++++++++++
drivers/misc/ipts/receiver.h | 16 ++
drivers/misc/ipts/resources.c | 128 +++++++++++++++
drivers/misc/ipts/resources.c | 128 +++++++++++++
drivers/misc/ipts/resources.h | 17 ++
drivers/misc/ipts/uapi.c | 211 +++++++++++++++++++++++++
drivers/misc/ipts/uapi.h | 47 ++++++
15 files changed, 1185 insertions(+)
drivers/misc/ipts/uapi.c | 208 ++++++++++++++++++++
drivers/misc/ipts/uapi.h | 47 +++++
15 files changed, 1329 insertions(+)
create mode 100644 drivers/misc/ipts/Kconfig
create mode 100644 drivers/misc/ipts/Makefile
create mode 100644 drivers/misc/ipts/context.h
@ -191,10 +220,10 @@ index 000000000000..f4b06a2d3f72
+#endif /* _IPTS_CONTEXT_H_ */
diff --git a/drivers/misc/ipts/control.c b/drivers/misc/ipts/control.c
new file mode 100644
index 000000000000..24d3d19a667a
index 000000000000..a1d1f97a13d7
--- /dev/null
+++ b/drivers/misc/ipts/control.c
@@ -0,0 +1,76 @@
@@ -0,0 +1,113 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2016 Intel Corporation
@ -223,13 +252,47 @@ index 000000000000..24d3d19a667a
+ memcpy(&cmd.payload, payload, size);
+
+ ret = mei_cldev_send(ipts->cldev, (u8 *)&cmd, sizeof(cmd.code) + size);
+ if (ret >= 0 || ret == -EINTR)
+ if (ret >= 0)
+ return 0;
+
+ dev_err(ipts->dev, "Error while sending: 0x%X:%d\n", code, ret);
+ /*
+ * During shutdown the device might get pulled away from below our feet.
+ * Dont log an error in this case, because it will confuse people.
+ */
+ if (ret != -ENODEV || ipts->status != IPTS_HOST_STATUS_STOPPING)
+ dev_err(ipts->dev, "Error while sending: 0x%X:%d\n", code, ret);
+
+ return ret;
+}
+
+int ipts_control_send_feedback(struct ipts_context *ipts, u32 buffer)
+{
+ struct ipts_feedback_cmd cmd;
+
+ memset(&cmd, 0, sizeof(struct ipts_feedback_cmd));
+ cmd.buffer = buffer;
+
+ return ipts_control_send(ipts, IPTS_CMD_FEEDBACK, &cmd,
+ sizeof(struct ipts_feedback_cmd));
+}
+
+int ipts_control_set_feature(struct ipts_context *ipts, u8 report, u8 value)
+{
+ struct ipts_feedback_buffer *feedback;
+
+ memset(ipts->host2me.address, 0, ipts->device_info.feedback_size);
+ feedback = (struct ipts_feedback_buffer *)ipts->host2me.address;
+
+ feedback->cmd_type = IPTS_FEEDBACK_CMD_TYPE_NONE;
+ feedback->data_type = IPTS_FEEDBACK_DATA_TYPE_SET_FEATURES;
+ feedback->buffer = IPTS_HOST2ME_BUFFER;
+ feedback->size = 2;
+ feedback->payload[0] = report;
+ feedback->payload[1] = value;
+
+ return ipts_control_send_feedback(ipts, IPTS_HOST2ME_BUFFER);
+}
+
+int ipts_control_start(struct ipts_context *ipts)
+{
+ if (ipts->status != IPTS_HOST_STATUS_STOPPED)
@ -245,6 +308,8 @@ index 000000000000..24d3d19a667a
+
+int ipts_control_stop(struct ipts_context *ipts)
+{
+ int ret;
+
+ if (ipts->status == IPTS_HOST_STATUS_STOPPING)
+ return -EBUSY;
+
@ -257,10 +322,11 @@ index 000000000000..24d3d19a667a
+ ipts_uapi_unlink();
+ ipts_resources_free(ipts);
+
+ if (!mei_cldev_enabled(ipts->cldev))
+ return 0;
+ ret = ipts_control_send_feedback(ipts, 0);
+ if (ret == -ENODEV)
+ ipts->status = IPTS_HOST_STATUS_STOPPED;
+
+ return ipts_control_send(ipts, IPTS_CMD_CLEAR_MEM_WINDOW, NULL, 0);
+ return ret;
+}
+
+int ipts_control_restart(struct ipts_context *ipts)
@ -273,10 +339,10 @@ index 000000000000..24d3d19a667a
+}
diff --git a/drivers/misc/ipts/control.h b/drivers/misc/ipts/control.h
new file mode 100644
index 000000000000..4ee0ceb84749
index 000000000000..2c44e9e0e99f
--- /dev/null
+++ b/drivers/misc/ipts/control.h
@@ -0,0 +1,22 @@
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (c) 2016 Intel Corporation
@ -294,6 +360,8 @@ index 000000000000..4ee0ceb84749
+
+int ipts_control_send(struct ipts_context *ipts, u32 cmd, void *payload,
+ size_t size);
+int ipts_control_send_feedback(struct ipts_context *ipts, u32 buffer);
+int ipts_control_set_feature(struct ipts_context *ipts, u8 report, u8 value);
+int ipts_control_start(struct ipts_context *ipts);
+int ipts_control_restart(struct ipts_context *ipts);
+int ipts_control_stop(struct ipts_context *ipts);
@ -301,10 +369,10 @@ index 000000000000..4ee0ceb84749
+#endif /* _IPTS_CONTROL_H_ */
diff --git a/drivers/misc/ipts/mei.c b/drivers/misc/ipts/mei.c
new file mode 100644
index 000000000000..2945809d5b46
index 000000000000..b3805a91383d
--- /dev/null
+++ b/drivers/misc/ipts/mei.c
@@ -0,0 +1,118 @@
@@ -0,0 +1,127 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2016 Intel Corporation
@ -316,8 +384,8 @@ index 000000000000..2945809d5b46
+#include <linux/delay.h>
+#include <linux/dma-mapping.h>
+#include <linux/mei_cl_bus.h>
+#include <linux/module.h>
+#include <linux/mod_devicetable.h>
+#include <linux/module.h>
+#include <linux/slab.h>
+
+#include "context.h"
@ -372,10 +440,19 @@ index 000000000000..2945809d5b46
+
+static int ipts_mei_remove(struct mei_cl_device *cldev)
+{
+ int i;
+ struct ipts_context *ipts = mei_cldev_get_drvdata(cldev);
+
+ mei_cldev_disable(cldev);
+ ipts_control_stop(ipts);
+
+ for (i = 0; i < 20; i++) {
+ if (ipts->status == IPTS_HOST_STATUS_STOPPED)
+ break;
+
+ msleep(25);
+ }
+
+ mei_cldev_disable(cldev);
+ kfree(ipts);
+
+ return 0;
@ -425,10 +502,10 @@ index 000000000000..2945809d5b46
+module_exit(ipts_mei_exit);
diff --git a/drivers/misc/ipts/protocol.h b/drivers/misc/ipts/protocol.h
new file mode 100644
index 000000000000..381068504d46
index 000000000000..c3458904a94d
--- /dev/null
+++ b/drivers/misc/ipts/protocol.h
@@ -0,0 +1,284 @@
@@ -0,0 +1,347 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/*
+ * Copyright (c) 2016 Intel Corporation
@ -572,6 +649,11 @@ index 000000000000..381068504d46
+ */
+#define IPTS_BUFFERS 16
+
+/*
+ * The special buffer ID that is used for direct host2me feedback.
+ */
+#define IPTS_HOST2ME_BUFFER IPTS_BUFFERS
+
+/**
+ * enum ipts_mode - Operation mode for IPTS hardware
+ * @IPTS_MODE_SINGLETOUCH: Fallback that supports only one finger and no stylus.
@ -649,6 +731,56 @@ index 000000000000..381068504d46
+} __packed;
+
+/**
+ * enum ipts_feedback_cmd_type - Commands that can be executed on the sensor through feedback.
+ */
+enum ipts_feedback_cmd_type {
+ IPTS_FEEDBACK_CMD_TYPE_NONE = 0,
+ IPTS_FEEDBACK_CMD_TYPE_SOFT_RESET = 1,
+ IPTS_FEEDBACK_CMD_TYPE_GOTO_ARMED = 2,
+ IPTS_FEEDBACK_CMD_TYPE_GOTO_SENSING = 3,
+ IPTS_FEEDBACK_CMD_TYPE_GOTO_SLEEP = 4,
+ IPTS_FEEDBACK_CMD_TYPE_GOTO_DOZE = 5,
+ IPTS_FEEDBACK_CMD_TYPE_HARD_RESET = 6,
+};
+
+/**
+ * enum ipts_feedback_data_type - Describes the data that a feedback buffer contains.
+ * @IPTS_FEEDBACK_DATA_TYPE_VENDOR: The buffer contains vendor specific feedback.
+ * @IPTS_FEEDBACK_DATA_TYPE_SET_FEATURES: The buffer contains a HID set features command.
+ * @IPTS_FEEDBACK_DATA_TYPE_GET_FEATURES: The buffer contains a HID get features command.
+ * @IPTS_FEEDBACK_DATA_TYPE_OUTPUT_REPORT: The buffer contains a HID output report.
+ * @IPTS_FEEDBACK_DATA_TYPE_STORE_DATA: The buffer contains calibration data for the sensor.
+ */
+enum ipts_feedback_data_type {
+ IPTS_FEEDBACK_DATA_TYPE_VENDOR = 0,
+ IPTS_FEEDBACK_DATA_TYPE_SET_FEATURES = 1,
+ IPTS_FEEDBACK_DATA_TYPE_GET_FEATURES = 2,
+ IPTS_FEEDBACK_DATA_TYPE_OUTPUT_REPORT = 3,
+ IPTS_FEEDBACK_DATA_TYPE_STORE_DATA = 4,
+};
+
+/**
+ * struct ipts_feedback_buffer - The contents of an IPTS feedback buffer.
+ * @cmd_type: A command that should be executed on the sensor.
+ * @size: The size of the payload to be written.
+ * @buffer: The ID of the buffer that contains this feedback data.
+ * @protocol: The protocol version of the EDS.
+ * @data_type: The type of payload that the buffer contains.
+ * @spi_offset: The offset at which to write the payload data.
+ * @payload: Payload for the feedback command, or 0 if no payload is sent.
+ */
+struct ipts_feedback_buffer {
+ enum ipts_feedback_cmd_type cmd_type;
+ u32 size;
+ u32 buffer;
+ u32 protocol;
+ enum ipts_feedback_data_type data_type;
+ u32 spi_offset;
+ u8 reserved[40];
+ u8 payload[];
+} __packed;
+
+/**
+ * enum ipts_reset_type - Possible ways of resetting the touch sensor
+ * @IPTS_RESET_TYPE_HARD: Perform hardware reset using GPIO pin.
+ * @IPTS_RESET_TYPE_SOFT: Perform software reset using SPI interface.
@ -701,6 +833,14 @@ index 000000000000..381068504d46
+} __packed;
+
+/**
+ * struct ipts_feedback_rsp - Payload for the FEEDBACK response.
+ * @buffer: The buffer that has received feedback.
+ */
+struct ipts_feedback_rsp {
+ u32 buffer;
+} __packed;
+
+/**
+ * struct ipts_response - A message sent from the ME to the host.
+ * @code: The message code describing the response. (see IPTS_RSP_*)
+ * @status: The status code returned by the command.
@ -715,10 +855,10 @@ index 000000000000..381068504d46
+#endif /* _IPTS_PROTOCOL_H_ */
diff --git a/drivers/misc/ipts/receiver.c b/drivers/misc/ipts/receiver.c
new file mode 100644
index 000000000000..916ba3ec211b
index 000000000000..23dca13c2139
--- /dev/null
+++ b/drivers/misc/ipts/receiver.c
@@ -0,0 +1,188 @@
@@ -0,0 +1,224 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2016 Intel Corporation
@ -728,6 +868,7 @@ index 000000000000..916ba3ec211b
+ */
+
+#include <linux/mei_cl_bus.h>
+#include <linux/moduleparam.h>
+#include <linux/types.h>
+
+#include "context.h"
@ -735,6 +876,13 @@ index 000000000000..916ba3ec211b
+#include "protocol.h"
+#include "resources.h"
+
+/*
+ * Temporary parameter to guard gen7 multitouch mode.
+ * Remove once gen7 has stable iptsd support.
+ */
+static bool gen7mt;
+module_param(gen7mt, bool, 0644);
+
+static int ipts_receiver_handle_get_device_info(struct ipts_context *ipts,
+ struct ipts_response *rsp)
+{
@ -795,11 +943,36 @@ index 000000000000..916ba3ec211b
+
+static int ipts_receiver_handle_set_mem_window(struct ipts_context *ipts)
+{
+ int ret;
+
+ dev_info(ipts->dev, "Device %04hX:%04hX ready\n",
+ ipts->device_info.vendor_id, ipts->device_info.device_id);
+ ipts->status = IPTS_HOST_STATUS_STARTED;
+
+ return ipts_control_send(ipts, IPTS_CMD_READY_FOR_DATA, NULL, 0);
+ ret = ipts_control_send(ipts, IPTS_CMD_READY_FOR_DATA, NULL, 0);
+ if (ret)
+ return ret;
+
+ if (!gen7mt)
+ return 0;
+
+ return ipts_control_set_feature(ipts, 0x5, 0x1);
+}
+
+static int ipts_receiver_handle_feedback(struct ipts_context *ipts,
+ struct ipts_response *rsp)
+{
+ struct ipts_feedback_rsp feedback;
+
+ if (ipts->status != IPTS_HOST_STATUS_STOPPING)
+ return 0;
+
+ memcpy(&feedback, rsp->payload, sizeof(feedback));
+
+ if (feedback.buffer < IPTS_BUFFERS - 1)
+ return ipts_control_send_feedback(ipts, feedback.buffer + 1);
+
+ return ipts_control_send(ipts, IPTS_CMD_CLEAR_MEM_WINDOW, NULL, 0);
+}
+
+static int ipts_receiver_handle_clear_mem_window(struct ipts_context *ipts)
@ -873,6 +1046,9 @@ index 000000000000..916ba3ec211b
+ case IPTS_RSP_SET_MEM_WINDOW:
+ ret = ipts_receiver_handle_set_mem_window(ipts);
+ break;
+ case IPTS_RSP_FEEDBACK:
+ ret = ipts_receiver_handle_feedback(ipts, rsp);
+ break;
+ case IPTS_RSP_CLEAR_MEM_WINDOW:
+ ret = ipts_receiver_handle_clear_mem_window(ipts);
+ break;
@ -1088,10 +1264,10 @@ index 000000000000..fdac0eee9156
+#endif /* _IPTS_RESOURCES_H_ */
diff --git a/drivers/misc/ipts/uapi.c b/drivers/misc/ipts/uapi.c
new file mode 100644
index 000000000000..8107a027223f
index 000000000000..598f0710ad64
--- /dev/null
+++ b/drivers/misc/ipts/uapi.c
@@ -0,0 +1,211 @@
@@ -0,0 +1,208 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2016 Intel Corporation
@ -1101,11 +1277,11 @@ index 000000000000..8107a027223f
+ */
+
+#include <linux/cdev.h>
+#include <linux/delay.h>
+#include <linux/device.h>
+#include <linux/fs.h>
+#include <linux/delay.h>
+#include <linux/uaccess.h>
+#include <linux/types.h>
+#include <linux/uaccess.h>
+
+#include "context.h"
+#include "control.h"
@ -1190,17 +1366,14 @@ index 000000000000..8107a027223f
+ struct file *file)
+{
+ int ret;
+ struct ipts_feedback_cmd cmd;
+ u32 buffer;
+
+ if (!ipts || ipts->status != IPTS_HOST_STATUS_STARTED)
+ return -ENODEV;
+
+ memset(&cmd, 0, sizeof(struct ipts_feedback_cmd));
+ cmd.buffer = MINOR(file->f_path.dentry->d_inode->i_rdev);
+
+ ret = ipts_control_send(ipts, IPTS_CMD_FEEDBACK, &cmd,
+ sizeof(struct ipts_feedback_cmd));
+ buffer = MINOR(file->f_path.dentry->d_inode->i_rdev);
+
+ ret = ipts_control_send_feedback(ipts, buffer);
+ if (ret)
+ return -EFAULT;
+

View file

@ -1,4 +1,4 @@
From e8a3fc1564b60e6a55a0ee1616731d584feeabaf Mon Sep 17 00:00:00 2001
From fcce57eca2cdcbd93aa3d55ec392839315149c8f Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sun, 16 Aug 2020 23:39:56 +0200
Subject: [PATCH] platform/x86: Add Driver to set up lid GPEs on MS Surface

View file

@ -1,4 +1,4 @@
From b5f61c00e82a5552d5c48a538442c103d730b1fe Mon Sep 17 00:00:00 2001
From dd75503cd08a7d3c694c535dc8468adce3d0afeb Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 25 Jul 2020 17:19:53 +0200
Subject: [PATCH] i2c: acpi: Implement RawBytes read access
@ -110,7 +110,7 @@ index 37c510d9347a..aed579942436 100644
--
2.30.1
From 3e4f517c369e8356fea37f130ff284343ca5cd15 Mon Sep 17 00:00:00 2001
From 5e92c729b174515bc511c2742270712e20dc1bd0 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sun, 6 Sep 2020 04:01:19 +0200
Subject: [PATCH] platform/x86: Add driver for Surface Book 1 dGPU switch

View file

@ -1,4 +1,4 @@
From 96a6523e58defc8462ccb29cff2b9d07b21c8ed5 Mon Sep 17 00:00:00 2001
From b1175454db03da261c46b0661cb8784565cabd87 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Mon, 17 Aug 2020 01:23:20 +0200
Subject: [PATCH] Add file2alias support for Surface Aggregator Module devices
@ -99,7 +99,7 @@ index 2417dd1dee33..a6c583362b92 100644
--
2.30.1
From 23b5e1e8212af0785a88344444b01d0040d6ab7f Mon Sep 17 00:00:00 2001
From ea74cc928782d6a17ea7f44bc320672b252e357d Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Mon, 17 Aug 2020 01:44:30 +0200
Subject: [PATCH] platform/x86: Add support for Surface System Aggregator
@ -133,10 +133,10 @@ Patchset: surface-sam
drivers/hid/Makefile | 2 +
drivers/hid/surface-hid/Kconfig | 42 +
drivers/hid/surface-hid/Makefile | 7 +
drivers/hid/surface-hid/surface_hid.c | 256 ++
drivers/hid/surface-hid/surface_hid.c | 253 ++
drivers/hid/surface-hid/surface_hid_core.c | 272 ++
drivers/hid/surface-hid/surface_hid_core.h | 77 +
drivers/hid/surface-hid/surface_kbd.c | 303 ++
drivers/hid/surface-hid/surface_kbd.c | 300 ++
drivers/platform/x86/Kconfig | 102 +
drivers/platform/x86/Makefile | 7 +
drivers/platform/x86/surface_acpi_notify.c | 886 ++++++
@ -156,7 +156,7 @@ Patchset: surface-sam
.../surface_aggregator/ssh_request_layer.h | 143 +
.../platform/x86/surface_aggregator/trace.h | 632 ++++
.../platform/x86/surface_aggregator_cdev.c | 322 ++
.../x86/surface_aggregator_registry.c | 641 ++++
.../x86/surface_aggregator_registry.c | 644 ++++
drivers/platform/x86/surface_dtx.c | 1289 ++++++++
drivers/platform/x86/surface_perfmode.c | 122 +
drivers/power/supply/Kconfig | 32 +
@ -166,13 +166,13 @@ Patchset: surface-sam
include/linux/mod_devicetable.h | 5 +-
include/linux/surface_acpi_notify.h | 39 +
include/linux/surface_aggregator/controller.h | 824 ++++++
include/linux/surface_aggregator/device.h | 423 +++
include/linux/surface_aggregator/device.h | 424 +++
include/linux/surface_aggregator/serial_hub.h | 672 +++++
include/uapi/linux/surface_aggregator/cdev.h | 78 +
include/uapi/linux/surface_aggregator/dtx.h | 146 +
scripts/mod/devicetable-offsets.c | 3 +-
scripts/mod/file2alias.c | 10 +-
55 files changed, 19258 insertions(+), 8 deletions(-)
55 files changed, 19256 insertions(+), 8 deletions(-)
create mode 100644 Documentation/driver-api/surface_aggregator/client-api.rst
create mode 100644 Documentation/driver-api/surface_aggregator/client.rst
create mode 100644 Documentation/driver-api/surface_aggregator/clients/cdev.rst
@ -277,7 +277,7 @@ index 000000000000..a1117d57036a
+ :export:
diff --git a/Documentation/driver-api/surface_aggregator/client.rst b/Documentation/driver-api/surface_aggregator/client.rst
new file mode 100644
index 000000000000..26d13085a117
index 000000000000..e519d374c378
--- /dev/null
+++ b/Documentation/driver-api/surface_aggregator/client.rst
@@ -0,0 +1,393 @@
@ -531,7 +531,7 @@ index 000000000000..26d13085a117
+
+.. code-block:: c
+
+ int __ssam_tmp_perf_mode_set(struct ssam_controller *ctrl, const __le32 *arg);
+ static int __ssam_tmp_perf_mode_set(struct ssam_controller *ctrl, const __le32 *arg);
+
+executing the specified request, with the controller passed in when calling
+said function. In this example, the argument is provided via the ``arg``
@ -579,7 +579,7 @@ index 000000000000..26d13085a117
+
+.. code-block:: c
+
+ int ssam_bat_get_sta(struct ssam_device *sdev, __le32 *ret);
+ static int ssam_bat_get_sta(struct ssam_device *sdev, __le32 *ret);
+
+executing the specified request, using the device IDs and controller given
+in the client device. The full list of such macros for client devices is:
@ -2772,10 +2772,10 @@ index 000000000000..4ae11cf09b25
+obj-$(CONFIG_SURFACE_KBD) += surface_kbd.o
diff --git a/drivers/hid/surface-hid/surface_hid.c b/drivers/hid/surface-hid/surface_hid.c
new file mode 100644
index 000000000000..e4477c328536
index 000000000000..3477b31611ae
--- /dev/null
+++ b/drivers/hid/surface-hid/surface_hid.c
@@ -0,0 +1,256 @@
@@ -0,0 +1,253 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Surface System Aggregator Module (SSAM) HID transport driver for the
@ -2935,15 +2935,12 @@ index 000000000000..e4477c328536
+static u32 ssam_hid_event_fn(struct ssam_event_notifier *nf, const struct ssam_event *event)
+{
+ struct surface_hid_device *shid = container_of(nf, struct surface_hid_device, notif);
+ int status;
+
+ if (event->command_id != 0x00)
+ return 0;
+
+ status = hid_input_report(shid->hid, HID_INPUT_REPORT, (u8 *)&event->data[0],
+ event->length, 0);
+
+ return ssam_notifier_from_errno(status) | SSAM_NOTIF_HANDLED;
+ hid_input_report(shid->hid, HID_INPUT_REPORT, (u8 *)&event->data[0], event->length, 0);
+ return SSAM_NOTIF_HANDLED;
+}
+
+
@ -3395,10 +3392,10 @@ index 000000000000..4b1a7b57e035
+#endif /* SURFACE_HID_CORE_H */
diff --git a/drivers/hid/surface-hid/surface_kbd.c b/drivers/hid/surface-hid/surface_kbd.c
new file mode 100644
index 000000000000..e72baac952ec
index 000000000000..0635341bc517
--- /dev/null
+++ b/drivers/hid/surface-hid/surface_kbd.c
@@ -0,0 +1,303 @@
@@ -0,0 +1,300 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Surface System Aggregator Module (SSAM) HID transport driver for the legacy
@ -3525,7 +3522,6 @@ index 000000000000..e72baac952ec
+static u32 ssam_kbd_event_fn(struct ssam_event_notifier *nf, const struct ssam_event *event)
+{
+ struct surface_hid_device *shid = container_of(nf, struct surface_hid_device, notif);
+ int status;
+
+ /*
+ * Check against device UID manually, as registry and device target
@ -3544,10 +3540,8 @@ index 000000000000..e72baac952ec
+ if (!ssam_kbd_is_input_event(event))
+ return 0;
+
+ status = hid_input_report(shid->hid, HID_INPUT_REPORT, (u8 *)&event->data[0],
+ event->length, 0);
+
+ return ssam_notifier_from_errno(status) | SSAM_NOTIF_HANDLED;
+ hid_input_report(shid->hid, HID_INPUT_REPORT, (u8 *)&event->data[0], event->length, 0);
+ return SSAM_NOTIF_HANDLED;
+}
+
+
@ -5279,7 +5273,7 @@ index 000000000000..7712baaed6a5
+#endif /* _SURFACE_AGGREGATOR_BUS_H */
diff --git a/drivers/platform/x86/surface_aggregator/controller.c b/drivers/platform/x86/surface_aggregator/controller.c
new file mode 100644
index 000000000000..5bcb59ed579d
index 000000000000..aa6f37b4f46e
--- /dev/null
+++ b/drivers/platform/x86/surface_aggregator/controller.c
@@ -0,0 +1,2579 @@
@ -7035,35 +7029,35 @@ index 000000000000..5bcb59ed579d
+
+/* -- Internal SAM requests. ------------------------------------------------ */
+
+static SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_get_firmware_version, __le32, {
+SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_get_firmware_version, __le32, {
+ .target_category = SSAM_SSH_TC_SAM,
+ .target_id = 0x01,
+ .command_id = 0x13,
+ .instance_id = 0x00,
+});
+
+static SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_display_off, u8, {
+SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_display_off, u8, {
+ .target_category = SSAM_SSH_TC_SAM,
+ .target_id = 0x01,
+ .command_id = 0x15,
+ .instance_id = 0x00,
+});
+
+static SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_display_on, u8, {
+SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_display_on, u8, {
+ .target_category = SSAM_SSH_TC_SAM,
+ .target_id = 0x01,
+ .command_id = 0x16,
+ .instance_id = 0x00,
+});
+
+static SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_d0_exit, u8, {
+SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_d0_exit, u8, {
+ .target_category = SSAM_SSH_TC_SAM,
+ .target_id = 0x01,
+ .command_id = 0x33,
+ .instance_id = 0x00,
+});
+
+static SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_d0_entry, u8, {
+SSAM_DEFINE_SYNC_REQUEST_R(ssam_ssh_notif_d0_entry, u8, {
+ .target_category = SSAM_SSH_TC_SAM,
+ .target_id = 0x01,
+ .command_id = 0x34,
@ -14265,10 +14259,10 @@ index 000000000000..79e28fab7e40
+MODULE_LICENSE("GPL");
diff --git a/drivers/platform/x86/surface_aggregator_registry.c b/drivers/platform/x86/surface_aggregator_registry.c
new file mode 100644
index 000000000000..caee90d135c5
index 000000000000..c42b97f61a57
--- /dev/null
+++ b/drivers/platform/x86/surface_aggregator_registry.c
@@ -0,0 +1,641 @@
@@ -0,0 +1,644 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Surface System Aggregator Module (SSAM) client device registry.
@ -14462,7 +14456,7 @@ index 000000000000..caee90d135c5
+ NULL,
+};
+
+/* Devices for Surface Pro 7. */
+/* Devices for Surface Pro 7 and Surface Pro 7+. */
+static const struct software_node *ssam_node_group_sp7[] = {
+ &ssam_node_root,
+ &ssam_node_bat_ac,
@ -14573,7 +14567,7 @@ index 000000000000..caee90d135c5
+ struct ssam_event_notifier notif;
+};
+
+static SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_query_opmode, u8, {
+SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_query_opmode, u8, {
+ .target_category = SSAM_SSH_TC_BAS,
+ .target_id = 0x01,
+ .command_id = 0x0d,
@ -14792,6 +14786,9 @@ index 000000000000..caee90d135c5
+ /* Surface Pro 7 */
+ { "MSHW0116", (unsigned long)ssam_node_group_sp7 },
+
+ /* Surface Pro 7+ */
+ { "MSHW0119", (unsigned long)ssam_node_group_sp7 },
+
+ /* Surface Book 2 */
+ { "MSHW0107", (unsigned long)ssam_node_group_sb2 },
+
@ -14912,7 +14909,7 @@ index 000000000000..caee90d135c5
+MODULE_LICENSE("GPL");
diff --git a/drivers/platform/x86/surface_dtx.c b/drivers/platform/x86/surface_dtx.c
new file mode 100644
index 000000000000..4bb5d286bf95
index 000000000000..85451eb94d98
--- /dev/null
+++ b/drivers/platform/x86/surface_dtx.c
@@ -0,0 +1,1289 @@
@ -14987,63 +14984,63 @@ index 000000000000..4bb5d286bf95
+
+static_assert(sizeof(struct ssam_bas_base_info) == 2);
+
+static SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_lock, {
+SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_lock, {
+ .target_category = SSAM_SSH_TC_BAS,
+ .target_id = 0x01,
+ .command_id = 0x06,
+ .instance_id = 0x00,
+});
+
+static SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_unlock, {
+SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_unlock, {
+ .target_category = SSAM_SSH_TC_BAS,
+ .target_id = 0x01,
+ .command_id = 0x07,
+ .instance_id = 0x00,
+});
+
+static SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_request, {
+SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_request, {
+ .target_category = SSAM_SSH_TC_BAS,
+ .target_id = 0x01,
+ .command_id = 0x08,
+ .instance_id = 0x00,
+});
+
+static SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_confirm, {
+SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_confirm, {
+ .target_category = SSAM_SSH_TC_BAS,
+ .target_id = 0x01,
+ .command_id = 0x09,
+ .instance_id = 0x00,
+});
+
+static SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_heartbeat, {
+SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_heartbeat, {
+ .target_category = SSAM_SSH_TC_BAS,
+ .target_id = 0x01,
+ .command_id = 0x0a,
+ .instance_id = 0x00,
+});
+
+static SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_cancel, {
+SSAM_DEFINE_SYNC_REQUEST_N(ssam_bas_latch_cancel, {
+ .target_category = SSAM_SSH_TC_BAS,
+ .target_id = 0x01,
+ .command_id = 0x0b,
+ .instance_id = 0x00,
+});
+
+static SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_get_base, struct ssam_bas_base_info, {
+SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_get_base, struct ssam_bas_base_info, {
+ .target_category = SSAM_SSH_TC_BAS,
+ .target_id = 0x01,
+ .command_id = 0x0c,
+ .instance_id = 0x00,
+});
+
+static SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_get_device_mode, u8, {
+SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_get_device_mode, u8, {
+ .target_category = SSAM_SSH_TC_BAS,
+ .target_id = 0x01,
+ .command_id = 0x0d,
+ .instance_id = 0x00,
+});
+
+static SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_get_latch_status, u8, {
+SSAM_DEFINE_SYNC_REQUEST_R(ssam_bas_get_latch_status, u8, {
+ .target_category = SSAM_SSH_TC_BAS,
+ .target_id = 0x01,
+ .command_id = 0x11,
@ -16207,7 +16204,7 @@ index 000000000000..4bb5d286bf95
+MODULE_LICENSE("GPL");
diff --git a/drivers/platform/x86/surface_perfmode.c b/drivers/platform/x86/surface_perfmode.c
new file mode 100644
index 000000000000..3b92a43f8606
index 000000000000..a9114e001d0d
--- /dev/null
+++ b/drivers/platform/x86/surface_perfmode.c
@@ -0,0 +1,122 @@
@ -16246,12 +16243,12 @@ index 000000000000..3b92a43f8606
+ __le16 unknown2;
+} __packed;
+
+static SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_tmp_perf_mode_get, struct ssam_perf_info, {
+SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_tmp_perf_mode_get, struct ssam_perf_info, {
+ .target_category = SSAM_SSH_TC_TMP,
+ .command_id = 0x02,
+});
+
+static SSAM_DEFINE_SYNC_REQUEST_CL_W(__ssam_tmp_perf_mode_set, __le32, {
+SSAM_DEFINE_SYNC_REQUEST_CL_W(__ssam_tmp_perf_mode_set, __le32, {
+ .target_category = SSAM_SSH_TC_TMP,
+ .command_id = 0x03,
+});
@ -16334,10 +16331,10 @@ index 000000000000..3b92a43f8606
+MODULE_DESCRIPTION("Performance mode interface for Surface System Aggregator Module");
+MODULE_LICENSE("GPL");
diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
index eec646c568b7..d4105228a2a5 100644
index 1699b9269a78..d4d756d95778 100644
--- a/drivers/power/supply/Kconfig
+++ b/drivers/power/supply/Kconfig
@@ -774,4 +774,36 @@ config RN5T618_POWER
@@ -775,4 +775,36 @@ config RN5T618_POWER
This driver can also be built as a module. If so, the module will be
called rn5t618_power.
@ -16386,7 +16383,7 @@ index dd4b86318cd9..9fdd34956153 100644
+obj-$(CONFIG_CHARGER_SURFACE) += surface_charger.o
diff --git a/drivers/power/supply/surface_battery.c b/drivers/power/supply/surface_battery.c
new file mode 100644
index 000000000000..327fd7af386b
index 000000000000..b93a4f556b5c
--- /dev/null
+++ b/drivers/power/supply/surface_battery.c
@@ -0,0 +1,901 @@
@ -16477,25 +16474,25 @@ index 000000000000..327fd7af386b
+#define SPWR_BATTERY_VALUE_UNKNOWN 0xffffffff
+
+/* Get battery status (_STA) */
+static SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_sta, __le32, {
+SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_sta, __le32, {
+ .target_category = SSAM_SSH_TC_BAT,
+ .command_id = 0x01,
+});
+
+/* Get battery static information (_BIX). */
+static SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_bix, struct spwr_bix, {
+SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_bix, struct spwr_bix, {
+ .target_category = SSAM_SSH_TC_BAT,
+ .command_id = 0x02,
+});
+
+/* Get battery dynamic information (_BST). */
+static SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_bst, struct spwr_bst, {
+SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_bst, struct spwr_bst, {
+ .target_category = SSAM_SSH_TC_BAT,
+ .command_id = 0x03,
+});
+
+/* Set battery trip point (_BTP). */
+static SSAM_DEFINE_SYNC_REQUEST_CL_W(ssam_bat_set_btp, __le32, {
+SSAM_DEFINE_SYNC_REQUEST_CL_W(ssam_bat_set_btp, __le32, {
+ .target_category = SSAM_SSH_TC_BAT,
+ .command_id = 0x04,
+});
@ -17293,7 +17290,7 @@ index 000000000000..327fd7af386b
+MODULE_LICENSE("GPL");
diff --git a/drivers/power/supply/surface_charger.c b/drivers/power/supply/surface_charger.c
new file mode 100644
index 000000000000..982f9b9ef6f5
index 000000000000..fe484523a2c2
--- /dev/null
+++ b/drivers/power/supply/surface_charger.c
@@ -0,0 +1,296 @@
@ -17327,13 +17324,13 @@ index 000000000000..982f9b9ef6f5
+};
+
+/* Get battery status (_STA). */
+static SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_sta, __le32, {
+SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_sta, __le32, {
+ .target_category = SSAM_SSH_TC_BAT,
+ .command_id = 0x01,
+});
+
+/* Get platform power source for battery (_PSR / DPTF PSRC). */
+static SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_psrc, __le32, {
+SSAM_DEFINE_SYNC_REQUEST_CL_R(ssam_bat_get_psrc, __le32, {
+ .target_category = SSAM_SSH_TC_BAT,
+ .command_id = 0x0d,
+});
@ -17663,7 +17660,7 @@ index 000000000000..8e3e86c7d78c
+#endif /* _LINUX_SURFACE_ACPI_NOTIFY_H */
diff --git a/include/linux/surface_aggregator/controller.h b/include/linux/surface_aggregator/controller.h
new file mode 100644
index 000000000000..f4b1ba887384
index 000000000000..0806796eabcb
--- /dev/null
+++ b/include/linux/surface_aggregator/controller.h
@@ -0,0 +1,824 @@
@ -18013,16 +18010,16 @@ index 000000000000..f4b1ba887384
+ * request has been fully completed. The required transport buffer will be
+ * allocated on the stack.
+ *
+ * The generated function is defined as ``int name(struct ssam_controller
+ * *ctrl)``, returning the status of the request, which is zero on success and
+ * negative on failure. The ``ctrl`` parameter is the controller via which the
+ * request is being sent.
+ * The generated function is defined as ``static int name(struct
+ * ssam_controller *ctrl)``, returning the status of the request, which is
+ * zero on success and negative on failure. The ``ctrl`` parameter is the
+ * controller via which the request is being sent.
+ *
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
+ * the generated function.
+ */
+#define SSAM_DEFINE_SYNC_REQUEST_N(name, spec...) \
+ int name(struct ssam_controller *ctrl) \
+ static int name(struct ssam_controller *ctrl) \
+ { \
+ struct ssam_request_spec s = (struct ssam_request_spec)spec; \
+ struct ssam_request rqst; \
@ -18052,17 +18049,17 @@ index 000000000000..f4b1ba887384
+ * returning once the request has been fully completed. The required transport
+ * buffer will be allocated on the stack.
+ *
+ * The generated function is defined as ``int name(struct ssam_controller
+ * *ctrl, const atype *arg)``, returning the status of the request, which is
+ * zero on success and negative on failure. The ``ctrl`` parameter is the
+ * controller via which the request is sent. The request argument is specified
+ * via the ``arg`` pointer.
+ * The generated function is defined as ``static int name(struct
+ * ssam_controller *ctrl, const atype *arg)``, returning the status of the
+ * request, which is zero on success and negative on failure. The ``ctrl``
+ * parameter is the controller via which the request is sent. The request
+ * argument is specified via the ``arg`` pointer.
+ *
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
+ * the generated function.
+ */
+#define SSAM_DEFINE_SYNC_REQUEST_W(name, atype, spec...) \
+ int name(struct ssam_controller *ctrl, const atype *arg) \
+ static int name(struct ssam_controller *ctrl, const atype *arg) \
+ { \
+ struct ssam_request_spec s = (struct ssam_request_spec)spec; \
+ struct ssam_request rqst; \
@ -18093,17 +18090,17 @@ index 000000000000..f4b1ba887384
+ * request itself, returning once the request has been fully completed. The
+ * required transport buffer will be allocated on the stack.
+ *
+ * The generated function is defined as ``int name(struct ssam_controller
+ * *ctrl, rtype *ret)``, returning the status of the request, which is zero on
+ * success and negative on failure. The ``ctrl`` parameter is the controller
+ * via which the request is sent. The request's return value is written to the
+ * memory pointed to by the ``ret`` parameter.
+ * The generated function is defined as ``static int name(struct
+ * ssam_controller *ctrl, rtype *ret)``, returning the status of the request,
+ * which is zero on success and negative on failure. The ``ctrl`` parameter is
+ * the controller via which the request is sent. The request's return value is
+ * written to the memory pointed to by the ``ret`` parameter.
+ *
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
+ * the generated function.
+ */
+#define SSAM_DEFINE_SYNC_REQUEST_R(name, rtype, spec...) \
+ int name(struct ssam_controller *ctrl, rtype *ret) \
+ static int name(struct ssam_controller *ctrl, rtype *ret) \
+ { \
+ struct ssam_request_spec s = (struct ssam_request_spec)spec; \
+ struct ssam_request rqst; \
@ -18152,17 +18149,17 @@ index 000000000000..f4b1ba887384
+ * returning once the request has been fully completed. The required transport
+ * buffer will be allocated on the stack.
+ *
+ * The generated function is defined as ``int name(struct ssam_controller
+ * *ctrl, u8 tid, u8 iid)``, returning the status of the request, which is
+ * zero on success and negative on failure. The ``ctrl`` parameter is the
+ * controller via which the request is sent, ``tid`` the target ID for the
+ * request, and ``iid`` the instance ID.
+ * The generated function is defined as ``static int name(struct
+ * ssam_controller *ctrl, u8 tid, u8 iid)``, returning the status of the
+ * request, which is zero on success and negative on failure. The ``ctrl``
+ * parameter is the controller via which the request is sent, ``tid`` the
+ * target ID for the request, and ``iid`` the instance ID.
+ *
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
+ * the generated function.
+ */
+#define SSAM_DEFINE_SYNC_REQUEST_MD_N(name, spec...) \
+ int name(struct ssam_controller *ctrl, u8 tid, u8 iid) \
+ static int name(struct ssam_controller *ctrl, u8 tid, u8 iid) \
+ { \
+ struct ssam_request_spec_md s = (struct ssam_request_spec_md)spec; \
+ struct ssam_request rqst; \
@ -18193,18 +18190,18 @@ index 000000000000..f4b1ba887384
+ * the request itself, returning once the request has been fully completed.
+ * The required transport buffer will be allocated on the stack.
+ *
+ * The generated function is defined as ``int name(struct ssam_controller
+ * *ctrl, u8 tid, u8 iid, const atype *arg)``, returning the status of the
+ * request, which is zero on success and negative on failure. The ``ctrl``
+ * parameter is the controller via which the request is sent, ``tid`` the
+ * target ID for the request, and ``iid`` the instance ID. The request argument
+ * is specified via the ``arg`` pointer.
+ * The generated function is defined as ``static int name(struct
+ * ssam_controller *ctrl, u8 tid, u8 iid, const atype *arg)``, returning the
+ * status of the request, which is zero on success and negative on failure.
+ * The ``ctrl`` parameter is the controller via which the request is sent,
+ * ``tid`` the target ID for the request, and ``iid`` the instance ID. The
+ * request argument is specified via the ``arg`` pointer.
+ *
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
+ * the generated function.
+ */
+#define SSAM_DEFINE_SYNC_REQUEST_MD_W(name, atype, spec...) \
+ int name(struct ssam_controller *ctrl, u8 tid, u8 iid, const atype *arg)\
+ static int name(struct ssam_controller *ctrl, u8 tid, u8 iid, const atype *arg) \
+ { \
+ struct ssam_request_spec_md s = (struct ssam_request_spec_md)spec; \
+ struct ssam_request rqst; \
@ -18236,18 +18233,18 @@ index 000000000000..f4b1ba887384
+ * execution of the request itself, returning once the request has been fully
+ * completed. The required transport buffer will be allocated on the stack.
+ *
+ * The generated function is defined as ``int name(struct ssam_controller
+ * *ctrl, u8 tid, u8 iid, rtype *ret)``, returning the status of the request,
+ * which is zero on success and negative on failure. The ``ctrl`` parameter is
+ * the controller via which the request is sent, ``tid`` the target ID for the
+ * request, and ``iid`` the instance ID. The request's return value is written
+ * to the memory pointed to by the ``ret`` parameter.
+ * The generated function is defined as ``static int name(struct
+ * ssam_controller *ctrl, u8 tid, u8 iid, rtype *ret)``, returning the status
+ * of the request, which is zero on success and negative on failure. The
+ * ``ctrl`` parameter is the controller via which the request is sent, ``tid``
+ * the target ID for the request, and ``iid`` the instance ID. The request's
+ * return value is written to the memory pointed to by the ``ret`` parameter.
+ *
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
+ * the generated function.
+ */
+#define SSAM_DEFINE_SYNC_REQUEST_MD_R(name, rtype, spec...) \
+ int name(struct ssam_controller *ctrl, u8 tid, u8 iid, rtype *ret) \
+ static int name(struct ssam_controller *ctrl, u8 tid, u8 iid, rtype *ret) \
+ { \
+ struct ssam_request_spec_md s = (struct ssam_request_spec_md)spec; \
+ struct ssam_request rqst; \
@ -18493,10 +18490,10 @@ index 000000000000..f4b1ba887384
+#endif /* _LINUX_SURFACE_AGGREGATOR_CONTROLLER_H */
diff --git a/include/linux/surface_aggregator/device.h b/include/linux/surface_aggregator/device.h
new file mode 100644
index 000000000000..02f3e06c0a60
index 000000000000..4441ad667c3f
--- /dev/null
+++ b/include/linux/surface_aggregator/device.h
@@ -0,0 +1,423 @@
@@ -0,0 +1,424 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Surface System Aggregator Module (SSAM) bus and client-device subsystem.
@ -18835,17 +18832,18 @@ index 000000000000..02f3e06c0a60
+ * request has been fully completed. The required transport buffer will be
+ * allocated on the stack.
+ *
+ * The generated function is defined as ``int name(struct ssam_device *sdev)``,
+ * returning the status of the request, which is zero on success and negative
+ * on failure. The ``sdev`` parameter specifies both the target device of the
+ * request and by association the controller via which the request is sent.
+ * The generated function is defined as ``static int name(struct ssam_device
+ * *sdev)``, returning the status of the request, which is zero on success and
+ * negative on failure. The ``sdev`` parameter specifies both the target
+ * device of the request and by association the controller via which the
+ * request is sent.
+ *
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
+ * the generated function.
+ */
+#define SSAM_DEFINE_SYNC_REQUEST_CL_N(name, spec...) \
+ SSAM_DEFINE_SYNC_REQUEST_MD_N(__raw_##name, spec) \
+ int name(struct ssam_device *sdev) \
+ static int name(struct ssam_device *sdev) \
+ { \
+ return __raw_##name(sdev->ctrl, sdev->uid.target, \
+ sdev->uid.instance); \
@ -18867,19 +18865,19 @@ index 000000000000..02f3e06c0a60
+ * itself, returning once the request has been fully completed. The required
+ * transport buffer will be allocated on the stack.
+ *
+ * The generated function is defined as ``int name(struct ssam_device *sdev,
+ * const atype *arg)``, returning the status of the request, which is zero on
+ * success and negative on failure. The ``sdev`` parameter specifies both the
+ * target device of the request and by association the controller via which
+ * the request is sent. The request's argument is specified via the ``arg``
+ * pointer.
+ * The generated function is defined as ``static int name(struct ssam_device
+ * *sdev, const atype *arg)``, returning the status of the request, which is
+ * zero on success and negative on failure. The ``sdev`` parameter specifies
+ * both the target device of the request and by association the controller via
+ * which the request is sent. The request's argument is specified via the
+ * ``arg`` pointer.
+ *
+ * Refer to ssam_request_sync_onstack() for more details on the behavior of
+ * the generated function.
+ */
+#define SSAM_DEFINE_SYNC_REQUEST_CL_W(name, atype, spec...) \
+ SSAM_DEFINE_SYNC_REQUEST_MD_W(__raw_##name, atype, spec) \
+ int name(struct ssam_device *sdev, const atype *arg) \
+ static int name(struct ssam_device *sdev, const atype *arg) \
+ { \
+ return __raw_##name(sdev->ctrl, sdev->uid.target, \
+ sdev->uid.instance, arg); \
@ -18901,8 +18899,8 @@ index 000000000000..02f3e06c0a60
+ * itself, returning once the request has been fully completed. The required
+ * transport buffer will be allocated on the stack.
+ *
+ * The generated function is defined as ``int name(struct ssam_device *sdev,
+ * rtype *ret)``, returning the status of the request, which is zero on
+ * The generated function is defined as ``static int name(struct ssam_device
+ * *sdev, rtype *ret)``, returning the status of the request, which is zero on
+ * success and negative on failure. The ``sdev`` parameter specifies both the
+ * target device of the request and by association the controller via which
+ * the request is sent. The request's return value is written to the memory
@ -18913,7 +18911,7 @@ index 000000000000..02f3e06c0a60
+ */
+#define SSAM_DEFINE_SYNC_REQUEST_CL_R(name, rtype, spec...) \
+ SSAM_DEFINE_SYNC_REQUEST_MD_R(__raw_##name, rtype, spec) \
+ int name(struct ssam_device *sdev, rtype *ret) \
+ static int name(struct ssam_device *sdev, rtype *ret) \
+ { \
+ return __raw_##name(sdev->ctrl, sdev->uid.target, \
+ sdev->uid.instance, ret); \

View file

@ -1,4 +1,4 @@
From c210052439b7cbd1ddc4d25703087ad25cc240c7 Mon Sep 17 00:00:00 2001
From f6bc7d13604522e5f79dec0129d086f75e7a8887 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Mon, 9 Nov 2020 14:23:00 +0100
Subject: [PATCH] PCI: Run platform power transition on initial D0 entry
@ -43,7 +43,7 @@ Patchset: surface-hotplug
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 6427cbd0a5be..3200afed2604 100644
index 5c9345072510..93e2c762ca5e 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1804,7 +1804,7 @@ static int do_pci_enable_device(struct pci_dev *dev, int bars)
@ -58,7 +58,7 @@ index 6427cbd0a5be..3200afed2604 100644
--
2.30.1
From 924f1ae4e5c625f6fddb4bbed1b915d9ef6dd12a Mon Sep 17 00:00:00 2001
From 090ae65748e015cc4d510c56e6bf4682f385c863 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 31 Oct 2020 20:46:33 +0100
Subject: [PATCH] PCI: Add sysfs attribute for PCI device power state
@ -131,7 +131,7 @@ index d15c881e2e7e..b15f754e6346 100644
--
2.30.1
From 6e3cc9d0f7e5541b219240ba4344444e25a0a99d Mon Sep 17 00:00:00 2001
From 98326ff4eb318a63a396387c9cab346e44526a4e Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Mon, 14 Dec 2020 20:50:59 +0100
Subject: [PATCH] platform/x86: Add Surface Hotplug driver

View file

@ -1,4 +1,4 @@
From 9929845c4ef162a6bc28f16e211a8b5781a39a59 Mon Sep 17 00:00:00 2001
From 746a8d10782c945a565b97f54324a6a406f1b6bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= <verdre@v0yd.nl>
Date: Thu, 5 Nov 2020 13:09:45 +0100
Subject: [PATCH] hid/multitouch: Turn off Type Cover keyboard backlight when

View file

@ -1,4 +1,4 @@
From 1f0b9f668442306f8624e69a4066c81918e87ad1 Mon Sep 17 00:00:00 2001
From 3924248d73a90811f97faf14945e01a413d63ccf Mon Sep 17 00:00:00 2001
From: Max Leiter <maxwell.leiter@gmail.com>
Date: Sat, 19 Dec 2020 17:50:55 -0800
Subject: [PATCH] iio:light:apds9960 add detection for MSHW0184 ACPI device in

View file

@ -1,4 +1,4 @@
From 32471cc9c5d98f0d10dbea253304e0f96abb2916 Mon Sep 17 00:00:00 2001
From 60ab56136db4c10ffd97c18f743df3c8abd98e4d Mon Sep 17 00:00:00 2001
From: Sakari Ailus <sakari.ailus@linux.intel.com>
Date: Mon, 12 Oct 2020 21:04:11 +0300
Subject: [PATCH] ipu3-cio2: Use unsigned values where appropriate
@ -316,7 +316,7 @@ index 146492383aa5..7650d7998a3f 100644
--
2.30.1
From 34c2da7111d19237998a6420189f5896d0b7e037 Mon Sep 17 00:00:00 2001
From 36bd30ef316fab4bb42597c8e4a00aea72703044 Mon Sep 17 00:00:00 2001
From: Sakari Ailus <sakari.ailus@linux.intel.com>
Date: Mon, 12 Oct 2020 21:04:12 +0300
Subject: [PATCH] ipu3-cio2: Remove explicit type from frame size checks
@ -332,7 +332,7 @@ Patchset: cameras
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
index 1fcd131482e0..b2679ff185fc 100644
index dcbfe8c9abc7..a1f574095acc 100644
--- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c
+++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
@@ -1283,9 +1283,8 @@ static int cio2_subdev_set_fmt(struct v4l2_subdev *sd,
@ -350,7 +350,7 @@ index 1fcd131482e0..b2679ff185fc 100644
--
2.30.1
From c0d5f91f3262dfcad057817b7cc92e27f4bc82b5 Mon Sep 17 00:00:00 2001
From e82f25619a729c22dfa07b5e6e142e7aa1c5c21e Mon Sep 17 00:00:00 2001
From: Sakari Ailus <sakari.ailus@linux.intel.com>
Date: Mon, 12 Oct 2020 21:04:13 +0300
Subject: [PATCH] ipu3-cio2: Rename CIO2_IMAGE_MAX_LENGTH as
@ -370,7 +370,7 @@ Patchset: cameras
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
index b2679ff185fc..51c4dd6a8f9a 100644
index a1f574095acc..93fd25a5a3e9 100644
--- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c
+++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
@@ -1095,8 +1095,8 @@ static int cio2_v4l2_try_fmt(struct file *file, void *fh, struct v4l2_format *f)
@ -409,7 +409,7 @@ index 7650d7998a3f..ccf0b85ae36f 100644
--
2.30.1
From dc6a77ee8a8ad188cc3bd63231b7759ce6e95503 Mon Sep 17 00:00:00 2001
From 60714de2a41806b12bda79018d3ad935b780811c Mon Sep 17 00:00:00 2001
From: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
Date: Tue, 13 Oct 2020 17:25:35 +0300
Subject: [PATCH] ipu3-cio2: Check receved the size against payload size, not
@ -431,7 +431,7 @@ Patchset: cameras
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
index 51c4dd6a8f9a..c557d189200b 100644
index 93fd25a5a3e9..b244b9de142a 100644
--- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c
+++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
@@ -561,7 +561,9 @@ static void cio2_buffer_done(struct cio2_device *cio2, unsigned int dma_chan)
@ -463,55 +463,7 @@ index 51c4dd6a8f9a..c557d189200b 100644
--
2.30.1
From fbffeecd2e7454f14fae4c13b486dc136b49a750 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sat, 10 Oct 2020 23:42:09 +0100
Subject: [PATCH] software_node: Fix refcounts in
software_node_get_next_child()
The software_node_get_next_child() function currently does not hold
references to the child software_node that it finds or put the ref that
is held against the old child - fix that.
Fixes: 59abd83672f7 ("drivers: base: Introducing software nodes to the firmware node framework")
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Patchset: cameras
---
drivers/base/swnode.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c
index 010828fc785b..615a0c93e116 100644
--- a/drivers/base/swnode.c
+++ b/drivers/base/swnode.c
@@ -443,14 +443,18 @@ software_node_get_next_child(const struct fwnode_handle *fwnode,
struct swnode *c = to_swnode(child);
if (!p || list_empty(&p->children) ||
- (c && list_is_last(&c->entry, &p->children)))
+ (c && list_is_last(&c->entry, &p->children))) {
+ fwnode_handle_put(child);
return NULL;
+ }
if (c)
c = list_next_entry(c, entry);
else
c = list_first_entry(&p->children, struct swnode, entry);
- return &c->fwnode;
+
+ fwnode_handle_put(child);
+ return fwnode_handle_get(&c->fwnode);
}
static struct fwnode_handle *
--
2.30.1
From 025f45ed28564cdef6c7fe699432e1ae1f20a487 Mon Sep 17 00:00:00 2001
From 06a927eda11f9d41bf42b86c46b7e7ce019f0723 Mon Sep 17 00:00:00 2001
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: Wed, 30 Dec 2020 22:44:05 +0200
Subject: [PATCH] media: ipu3-cio2: Add headers that ipu3-cio2.h is direct user
@ -563,7 +515,7 @@ index ccf0b85ae36f..62187ab5ae43 100644
--
2.30.1
From 17f9b714c6c43dd36f96013e97ed6d47230df117 Mon Sep 17 00:00:00 2001
From dfaa9d2c373eebd0cbb847c0061313e819171539 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sat, 24 Oct 2020 22:42:28 +0100
Subject: [PATCH] device property: Return true in fwnode_device_is_available
@ -608,7 +560,7 @@ index 4c43d30145c6..bc9c634df6df 100644
--
2.30.1
From 7e8095e7a5754ab247ef6d7e3d459fd7b0de7b7a Mon Sep 17 00:00:00 2001
From f7ac530eac31ce194aa95a7e1176f1b32c2e99f3 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sat, 21 Nov 2020 22:06:38 +0000
Subject: [PATCH] device property: Call fwnode_graph_get_endpoint_by_id() for
@ -652,7 +604,7 @@ index bc9c634df6df..ddba75d90af2 100644
--
2.30.1
From b80bff10119170d8dab3cda43a71624a18ec5ae8 Mon Sep 17 00:00:00 2001
From d5829d687876a7a82e4a2abd19d715dbb5254f09 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sun, 25 Oct 2020 22:49:08 +0000
Subject: [PATCH] software_node: Enforce parent before child ordering of nodes
@ -755,7 +707,7 @@ index 615a0c93e116..ade49173ff8d 100644
--
2.30.1
From 7670dadea357641b8b9e5ed804e18b412fe334fc Mon Sep 17 00:00:00 2001
From 41bfa055214cb8485bed4d57894d42d0140632df Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Wed, 21 Oct 2020 22:25:03 +0100
Subject: [PATCH] software_node: unregister software_nodes in reverse order
@ -810,7 +762,7 @@ index ade49173ff8d..1f43c51b431e 100644
--
2.30.1
From c6b79e9a2a765592e11723d61a12e3c30f8c4650 Mon Sep 17 00:00:00 2001
From 0c4de965e317b17f4615a0ed7904311ef7009d7c Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Tue, 22 Dec 2020 13:09:05 +0000
Subject: [PATCH] device property: Define format macros for ports and endpoints
@ -851,7 +803,7 @@ index 9506f8ec0974..72d36d46287d 100644
--
2.30.1
From 56e57aa31cd20535fc3e3f685848da6b8ba7a469 Mon Sep 17 00:00:00 2001
From 1e7bd88e7b159c2855508d4585fb57a236de44c7 Mon Sep 17 00:00:00 2001
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Date: Tue, 15 Sep 2020 15:47:46 +0100
Subject: [PATCH] software_node: Add support for fwnode_graph*() family of
@ -1019,7 +971,7 @@ index 1f43c51b431e..2ff504aca0be 100644
--
2.30.1
From f70bc3eb837b1ad8c95150b96a9768d28d4848cd Mon Sep 17 00:00:00 2001
From 298847e9dfbfa7f4b7a59837b05dc53f5ddfbaa5 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sat, 10 Oct 2020 23:07:22 +0100
Subject: [PATCH] lib/test_printf.c: Use helper function to unwind array of
@ -1057,7 +1009,7 @@ index 7ac87f18a10f..7d60f24240a4 100644
--
2.30.1
From ecbb6f67417898624be3b3aded3aceb893025bfd Mon Sep 17 00:00:00 2001
From fb322fd7c12d58f08ebf8a282fa92ff54c5ae0f3 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sat, 10 Oct 2020 23:11:36 +0100
Subject: [PATCH] ipu3-cio2: Add T: entry to MAINTAINERS
@ -1088,7 +1040,7 @@ index 281de213ef47..5a1c6e959aa8 100644
--
2.30.1
From 231bcccd03410528c1c5971204f344ff289f9c29 Mon Sep 17 00:00:00 2001
From 4569fa0eb71334b63729468dffdb0cd2e93b30f3 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sat, 10 Oct 2020 22:47:21 +0100
Subject: [PATCH] ipu3-cio2: Rename ipu3-cio2.c
@ -1123,7 +1075,7 @@ rename to drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
--
2.30.1
From c2a6d9ea77c97c0810deca4efa0e20632a0d1580 Mon Sep 17 00:00:00 2001
From 72022e158e12175fd368f5ac7977e3b0b46ba791 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Wed, 21 Oct 2020 21:53:05 +0100
Subject: [PATCH] media: v4l2-core: v4l2-async: Check sd->fwnode->secondary in
@ -1164,7 +1116,7 @@ index e3ab003a6c85..9dd896d085ec 100644
--
2.30.1
From e2a35c5d387c7e8341afd52bf41a42c3cc9a8615 Mon Sep 17 00:00:00 2001
From d79b943e54fa699b597842a0b62b569caa750de4 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sun, 15 Nov 2020 08:15:34 +0000
Subject: [PATCH] ACPI / bus: Add acpi_dev_get_next_match_dev() and helper
@ -1273,7 +1225,7 @@ index 6d1879bf9440..02a716a0af5d 100644
--
2.30.1
From 356810b8ffa42d22eeaf19b694e6d225b74580f1 Mon Sep 17 00:00:00 2001
From c727db566a43fd685569f09d57d72a85bd339091 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sat, 19 Dec 2020 23:55:04 +0000
Subject: [PATCH] media: v4l2-fwnode: Include v4l2_fwnode_bus_type
@ -1350,7 +1302,7 @@ index ed0840f3d5df..6ca337c28b3c 100644
--
2.30.1
From f9f3ecfc891d1671fd45426e3194d774887da80b Mon Sep 17 00:00:00 2001
From ef0056003dc297a18494d1c517dd9e53c2150cf0 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Wed, 21 Oct 2020 21:53:44 +0100
Subject: [PATCH] ipu3-cio2: Add cio2-bridge to ipu3-cio2 driver
@ -1391,10 +1343,10 @@ index 5a1c6e959aa8..a6924e3401e8 100644
L: linux-media@vger.kernel.org
S: Maintained
diff --git a/drivers/media/pci/intel/ipu3/Kconfig b/drivers/media/pci/intel/ipu3/Kconfig
index 82d7f17e6a02..96a2231b16ad 100644
index 7a805201034b..24f4e79fe0cb 100644
--- a/drivers/media/pci/intel/ipu3/Kconfig
+++ b/drivers/media/pci/intel/ipu3/Kconfig
@@ -16,3 +16,21 @@ config VIDEO_IPU3_CIO2
@@ -17,3 +17,21 @@ config VIDEO_IPU3_CIO2
Say Y or M here if you have a Skylake/Kaby Lake SoC with MIPI CSI-2
connected camera.
The module will be called ipu3-cio2.
@ -1874,7 +1826,7 @@ index 000000000000..dd0ffcafa489
+
+#endif
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
index c557d189200b..8132cdf20f4f 100644
index b244b9de142a..d820de44f341 100644
--- a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
+++ b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c
@@ -1712,11 +1712,28 @@ static void cio2_queues_exit(struct cio2_device *cio2)
@ -1948,7 +1900,7 @@ index 62187ab5ae43..dc3e343a37fb 100644
--
2.30.1
From b138b0799d6b023a33cdd69b2ff6ddcf2b7f189c Mon Sep 17 00:00:00 2001
From a4bbca15d0dee2756ce041dc438227891e283e7c Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Wed, 2 Dec 2020 12:38:10 +0000
Subject: [PATCH] acpi: utils: move acpi_lpss_dep() to utils
@ -2050,7 +2002,7 @@ index ddca1550cce6..78b38775f18b 100644
--
2.30.1
From 84b2fdfd7ba36a7525ff97cd4d4080471cdcba06 Mon Sep 17 00:00:00 2001
From b6f77009e486d7702153f6e3f2b2f924ef57f6fb Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Thu, 26 Nov 2020 21:12:41 +0000
Subject: [PATCH] acpi: utils: Add function to fetch dependent acpi_devices
@ -2136,7 +2088,7 @@ index 02a716a0af5d..33deb22294f2 100644
--
2.30.1
From cad6e20a6ceacb6f120f20fddd9cadc0355802d7 Mon Sep 17 00:00:00 2001
From a2f8589451cea571342385699975efa9fefdc50d Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Mon, 16 Nov 2020 21:38:49 +0000
Subject: [PATCH] i2c: i2c-core-base: Use format macro in i2c_dev_set_name()
@ -2204,7 +2156,7 @@ index 56622658b215..65acae61dc5c 100644
--
2.30.1
From f2760c77484f8bfd90fbae8a1dc6ae2107cb2c6e Mon Sep 17 00:00:00 2001
From 588a3270324a2ebfaec98add9342fa9cd1993d36 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Wed, 2 Dec 2020 16:41:42 +0000
Subject: [PATCH] i2c: i2c-core-acpi: Add i2c_acpi_dev_name()
@ -2262,7 +2214,7 @@ index 65acae61dc5c..b82aac05b17f 100644
--
2.30.1
From 869d5dd9d5828a4728ea0204e09f7ff80d56c82e Mon Sep 17 00:00:00 2001
From 39497507992b2c4f2e106a734ed16c43b84cbe2e Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Mon, 16 Nov 2020 00:16:56 +0000
Subject: [PATCH] gpio: gpiolib-acpi: Export acpi_get_gpiod()
@ -2326,7 +2278,7 @@ index 5b1dc1ad4fb3..47ae139e8781 100644
--
2.30.1
From 8780e6b11b5d4b1a493e89cf9d4ecb4334845227 Mon Sep 17 00:00:00 2001
From a4a562f653decc1f7f75ba334761f2c0cb660d7e Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sat, 12 Dec 2020 23:56:59 +0000
Subject: [PATCH] mfd: Remove tps68470 MFD driver
@ -2517,7 +2469,7 @@ index 4a4df4ffd18c..000000000000
--
2.30.1
From 75ad8c2f266e8802fa95c3d59bf702af6019b41f Mon Sep 17 00:00:00 2001
From b595f24e55b231e1b51a001387e5ea32acdf5746 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Fri, 15 Jan 2021 12:37:31 +0000
Subject: [PATCH] platform: x86: Add intel_skl_int3472 driver
@ -3486,7 +3438,7 @@ index 000000000000..3fe27ec0caff
--
2.30.1
From 12d4fe655786e70db9868cd005c28e6d5361d6b1 Mon Sep 17 00:00:00 2001
From 8e4703223f189aa81f9c7b02ac4e33a898a7417f Mon Sep 17 00:00:00 2001
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Date: Fri, 11 Dec 2020 21:17:35 +0100
Subject: [PATCH] PCI: ACPI: Fix up ACPI companion lookup for device 0 on the
@ -3556,7 +3508,7 @@ index 745a4e0c4994..87e45a800919 100644
--
2.30.1
From bd5f7d894a6956b9f9abf41ee22d1fcb485d5f5d Mon Sep 17 00:00:00 2001
From c7ed7462d16ffc20cb8c51dc75cbc69278109612 Mon Sep 17 00:00:00 2001
From: Jake Day <jake@ninebysix.com>
Date: Fri, 25 Sep 2020 10:24:53 -0400
Subject: [PATCH] media: i2c: Add support for the OV5693 image sensor
@ -6913,7 +6865,7 @@ index 000000000000..9a508e1f3624
--
2.30.1
From d830bae59cb11cbc0f97dde540b14b931ed1c0b3 Mon Sep 17 00:00:00 2001
From 26bc1d4e7d8bf1af29ca5be8e358c52eb51cf249 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sun, 17 Jan 2021 19:08:18 +0000
Subject: [PATCH] media: i2c: Add reset pin toggling to ov5693
@ -6954,7 +6906,7 @@ index 32485e4ed42b..f9ced52ad37a 100644
--
2.30.1
From 7fb8c70cd22feb2ba77480f58d09ea44aff1c767 Mon Sep 17 00:00:00 2001
From 5a74660b40475341b846abe4e4633d96329ee57a Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sun, 17 Jan 2021 21:39:15 +0000
Subject: [PATCH] media: i2c: Fix misnamed variable in power_down() for ov5693
@ -6983,7 +6935,7 @@ index f9ced52ad37a..9fd44a3d1d85 100644
--
2.30.1
From 2e833ff778b536f2f6a401c979662122bf9e1277 Mon Sep 17 00:00:00 2001
From acb2613e770c90b092e9fa6ef6da7dd72036ac50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20W=C3=BCthrich?= <me@fabwu.ch>
Date: Fri, 22 Jan 2021 20:58:13 +0100
Subject: [PATCH] cio2-bridge: Parse sensor orientation and rotation
@ -7146,7 +7098,7 @@ index dd0ffcafa489..924d99d20328 100644
--
2.30.1
From e767277317119f90d0841ac9c3bdce118a461e6a Mon Sep 17 00:00:00 2001
From 2a1100a910b11fb01d65059f05ca86220e18cff4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20W=C3=BCthrich?= <me@fabwu.ch>
Date: Fri, 22 Jan 2021 21:23:47 +0100
Subject: [PATCH] ov5693: Add orientation and rotation controls
@ -7202,7 +7154,7 @@ index 9fd44a3d1d85..1a85800df7ed 100644
--
2.30.1
From 0823b3b1fd4f8ce2897681f9e9493a8e3c3ae952 Mon Sep 17 00:00:00 2001
From eda2c584736f68824078f435b66fcaf8d9909a6c Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sat, 23 Jan 2021 00:28:32 +0000
Subject: [PATCH] platform: x86: Stylistic updates for intel-skl-int3472
@ -7619,7 +7571,7 @@ index 3fe27ec0caff..40629291b339 100644
--
2.30.1
From e3cde392d3facfbf24232e866f644db25c012f5b Mon Sep 17 00:00:00 2001
From 16f13a4470eee4035f4bb0cef791f0f0e6e55cc2 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sat, 23 Jan 2021 00:30:15 +0000
Subject: [PATCH] platform: x86: Add recalc_rate opp to int3472-discrete clock
@ -7746,7 +7698,7 @@ index 42ae8396eb64..98eb1ec3399e 100644
--
2.30.1
From 1d1a0b5731f637597568a2e8cce2758e14b3c2ca Mon Sep 17 00:00:00 2001
From 3b1abbe703a989ec3585d4ec69168b8bea3e6527 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20W=C3=BCthrich?= <me@fabwu.ch>
Date: Sun, 24 Jan 2021 11:07:42 +0100
Subject: [PATCH] cio2-bridge: Use macros and add warnings
@ -7850,7 +7802,7 @@ index 924d99d20328..e1e388cc9f45 100644
--
2.30.1
From b070306c3889044cba1bd72c52cc818b642003a5 Mon Sep 17 00:00:00 2001
From c7ab0599026cb5feec200917a9d7d02c970bc244 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Mon, 8 Feb 2021 21:44:38 +0000
Subject: [PATCH] media: i2c: Tidy up ov5693_init_controls()
@ -7972,7 +7924,7 @@ index 9a508e1f3624..26819cf3f4d2 100644
--
2.30.1
From 77dd02990795cbc0eeb69d29a234ecef694612b9 Mon Sep 17 00:00:00 2001
From c98216a72b1fa2dae70866cf40a2861561655a0e Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Mon, 8 Feb 2021 21:46:49 +0000
Subject: [PATCH] media: i2c: Remove OV5693_PPL_DEFAULT
@ -8010,7 +7962,7 @@ index a9747ab783d7..7fb368eec327 100644
--
2.30.1
From 9c063797defadfe3580002f79d5503c4a697d1a4 Mon Sep 17 00:00:00 2001
From c64bcb33d35a4661bbc7f47038f4e842ffbd98f8 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Mon, 8 Feb 2021 22:53:02 +0000
Subject: [PATCH] media: i2c: Add vblank control to ov5693 driver
@ -8086,7 +8038,7 @@ index 26819cf3f4d2..9d7eed97963b 100644
--
2.30.1
From b32056993cea983468fc25d3e64e06e37f4c40a6 Mon Sep 17 00:00:00 2001
From 5936b342529158523867fbac7f4a02f10f37ba18 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Wed, 10 Feb 2021 00:36:32 +0000
Subject: [PATCH] media: i2c: update exposure control for ov5693
@ -8161,7 +8113,7 @@ index 1950d7ac2d54..cea767230aa9 100644
--
2.30.1
From 6233e6bbe8f499ba8b4c31f9df53daa1d221d303 Mon Sep 17 00:00:00 2001
From 5dd29397e21e3388233d1fa20651dc11680bd4b4 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Wed, 10 Feb 2021 00:39:42 +0000
Subject: [PATCH] media: i2c: Fix incorrect bit-setting
@ -8197,7 +8149,7 @@ index cea767230aa9..f681dbfcec56 100644
--
2.30.1
From c8f37984c1cddea585f2acf6c71b878a92d451d4 Mon Sep 17 00:00:00 2001
From 3ab19f7ca30b841d73458c9c4e136c3721fc9047 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Wed, 10 Feb 2021 16:25:48 +0000
Subject: [PATCH] media: i2c: Don't set stream on during mode config
@ -8347,7 +8299,7 @@ index 9d7eed97963b..965208078c2b 100644
--
2.30.1
From 0249d4e96dc77cedc82269d535ccb68a0ce3fc40 Mon Sep 17 00:00:00 2001
From 31055383a0a5af5e58609177a5423dadaacbe25d Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Wed, 10 Feb 2021 16:35:24 +0000
Subject: [PATCH] media: i2c: Update gain control for ov5693
@ -8419,7 +8371,7 @@ index f681dbfcec56..51eb3b05d121 100644
--
2.30.1
From 4655f5f33e843e03296049fc6efa10f4310eceb3 Mon Sep 17 00:00:00 2001
From 478b272458e849312e2fc544ab4acfaf90554d69 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Wed, 10 Feb 2021 23:44:39 +0000
Subject: [PATCH] media: i2c: Fixup gain read
@ -8482,7 +8434,7 @@ index 51eb3b05d121..952558c4f33b 100644
--
2.30.1
From 8ac23f62d38472adff45eae9c562023b5289cb53 Mon Sep 17 00:00:00 2001
From 7638fbac2e6c4ba7a06d096a8c8269d1d59eed7a Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Thu, 11 Feb 2021 00:40:10 +0000
Subject: [PATCH] media: i2c: Update controls on stream
@ -8517,7 +8469,7 @@ index 952558c4f33b..dd31083eeb7b 100644
--
2.30.1
From 7e8aa95e23d65abe33ca4d80f50fcf47a96ee313 Mon Sep 17 00:00:00 2001
From bfa85e6e6ca72c64a6854947667af07ad6a615bf Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Thu, 11 Feb 2021 23:29:15 +0000
Subject: [PATCH] media: i2c: Correct link frequency value
@ -8556,7 +8508,7 @@ index 965208078c2b..7f1d31a82d3d 100644
--
2.30.1
From 061cbcd2070ab1907d0702ff358255514a1efc47 Mon Sep 17 00:00:00 2001
From def629ed22f244789db7952c4cfa30ffff3dae6b Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Mon, 25 Jan 2021 23:12:09 +0000
Subject: [PATCH] media: i2c: Cleanup ov5693 driver
@ -9477,7 +9429,7 @@ index 7f1d31a82d3d..70ccb3aae4c7 100644
--
2.30.1
From 1bb274c64997c78a292658d4b62e4b025271737d Mon Sep 17 00:00:00 2001
From bcdacaeeba0d758f8d318f75d57e8e4b38e36076 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Thu, 28 Jan 2021 12:04:38 +0000
Subject: [PATCH] media: i2c: Add pm_runtime support to ov5693 driver
@ -9822,7 +9774,7 @@ index 70ccb3aae4c7..b78d3b474a43 100644
--
2.30.1
From 14139a66573795862858f43042067bab217e3a8d Mon Sep 17 00:00:00 2001
From 026275b89a6960c9537669b8da495a5795256dec Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Thu, 28 Jan 2021 12:07:36 +0000
Subject: [PATCH] media: i2c: Remove old power methods from ov5693
@ -9993,7 +9945,7 @@ index f2eaa5f71a31..ce26ce86fbd5 100644
--
2.30.1
From 5011775be888a29eaaf4100b229a80271cfc78da Mon Sep 17 00:00:00 2001
From c7b9a6abdc1f6d279a577b60c1618abf35a83602 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Thu, 28 Jan 2021 12:14:00 +0000
Subject: [PATCH] media: i2c: Trim unused headers from ov5693
@ -10034,7 +9986,7 @@ index ce26ce86fbd5..b3b391a49fdb 100644
--
2.30.1
From d9137b83092e75131784f32b2f43be8c2be1a13f Mon Sep 17 00:00:00 2001
From 5db2873f79b231f4c4850e58dec526b561d9085f Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sat, 13 Feb 2021 21:39:35 +0000
Subject: [PATCH] media: i2c: Remove VCM stuff
@ -10453,7 +10405,7 @@ index b3b391a49fdb..2c82b6578de9 100644
--
2.30.1
From 260af2d112381bd949f9900f141a1e7ef78951d7 Mon Sep 17 00:00:00 2001
From f48a9b083a4822c9d3787eeed47c256ada162259 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sat, 13 Feb 2021 22:16:08 +0000
Subject: [PATCH] media: i2c: Tidy up ov5693 sensor init
@ -10609,7 +10561,7 @@ index 2c82b6578de9..313bc9177328 100644
--
2.30.1
From e3683a5e3542eeff0cc582088ca06c448546bc7f Mon Sep 17 00:00:00 2001
From 88aa74b0f5a9a9d0f2864651fbcfa3e0b9804a70 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Fri, 12 Feb 2021 16:14:04 +0000
Subject: [PATCH] media: i2c: cleanup macros in ov5693.h
@ -10755,7 +10707,7 @@ index b78d3b474a43..6502777eb5f3 100644
--
2.30.1
From 2cb9a2fe394eea0b1aa79effb5a6a6fd6c04664f Mon Sep 17 00:00:00 2001
From 16d5169560fdbb2a2a8c85992c3e21014f0cb6cf Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Fri, 12 Feb 2021 16:19:09 +0000
Subject: [PATCH] media: i2c: use devm_kzalloc() to initialise ov5693
@ -10785,7 +10737,7 @@ index 313bc9177328..d092ed698eb3 100644
--
2.30.1
From c3881f7d460ab00663028af4fc1ebf3d18545664 Mon Sep 17 00:00:00 2001
From 441435af3fbd9f18d509eb6bbe234892a4e9f088 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Fri, 12 Feb 2021 16:26:21 +0000
Subject: [PATCH] media: i2c: Check for supported clk rate in probe
@ -10842,7 +10794,7 @@ index 6502777eb5f3..0dfbbe9a0ff2 100644
--
2.30.1
From 8c9c4147b12bf81ca8ac1c2250fed0fb399546fb Mon Sep 17 00:00:00 2001
From df8c9d7567313943c4a2b1bd2cd97bbd0aea6dfe Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sat, 13 Feb 2021 23:17:50 +0000
Subject: [PATCH] media: i2c: Use devres to fetch gpios
@ -10916,7 +10868,7 @@ index 8082d37841da..c580159079d2 100644
--
2.30.1
From c3291b3ac09027634975e779df81fda093a35db8 Mon Sep 17 00:00:00 2001
From 80a1e8920aecee92b515c2e6d74cf9096f9ef259 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sat, 13 Feb 2021 23:20:47 +0000
Subject: [PATCH] media: i2c: Use devres to fetch regulators
@ -10959,7 +10911,7 @@ index c580159079d2..9f61b470f8ba 100644
--
2.30.1
From 28c672a3b4746e7423a3995361e0f78c2618b045 Mon Sep 17 00:00:00 2001
From 5533ba50b6d9bc877453396ca999a9aa56d639df Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sun, 14 Feb 2021 12:39:14 +0000
Subject: [PATCH] media: i2c: remove debug print
@ -11038,7 +10990,7 @@ index 9f61b470f8ba..622a7ddf4063 100644
--
2.30.1
From af898b2bae16e9e8afaf7408a2dc7ecf503ac2f2 Mon Sep 17 00:00:00 2001
From 3c16b10440d17b2e68b66decd37e0f3d7bb23196 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sun, 14 Feb 2021 14:32:50 +0000
Subject: [PATCH] media: i2c: Remove unused resolutions from ov5693
@ -11467,7 +11419,7 @@ index 0dfbbe9a0ff2..29e6735112da 100644
--
2.30.1
From b048c8cca08fbe28af012cd2d0bd305579bc0d40 Mon Sep 17 00:00:00 2001
From 3ed6ebcfb67924b3114da07f941bd1c3b281f7e2 Mon Sep 17 00:00:00 2001
From: Daniel Scally <djrscally@gmail.com>
Date: Sun, 14 Feb 2021 14:45:58 +0000
Subject: [PATCH] media: i2c: update set_fmt() for ov5693

View file

@ -0,0 +1,120 @@
From c47e7b400cd429947027e8d149d1aab1af4385eb Mon Sep 17 00:00:00 2001
From: Maximilian Luz <luzmaximilian@gmail.com>
Date: Sat, 27 Feb 2021 00:45:52 +0100
Subject: [PATCH] ath10k: Add module parameters to override board files
Some Surface devices, specifically the Surface Go and AMD version of the
Surface Laptop 3 (wich both come with QCA6174 WiFi chips), work better
with a different board file, as it seems that the firmeware included
upstream is buggy.
As it is generally not a good idea to randomly overwrite files, let
alone doing so via packages, we add module parameters to override those
file names in the driver. This allows us to package/deploy the override
via a modprobe.d config.
Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
---
drivers/net/wireless/ath/ath10k/core.c | 58 ++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index d73ad60b571c..f242fd4b81a6 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -35,6 +35,9 @@ static bool skip_otp;
static bool rawmode;
static bool fw_diag_log;
+static char *override_board = "";
+static char *override_board2 = "";
+
unsigned long ath10k_coredump_mask = BIT(ATH10K_FW_CRASH_DUMP_REGISTERS) |
BIT(ATH10K_FW_CRASH_DUMP_CE_DATA);
@@ -47,6 +50,9 @@ module_param(rawmode, bool, 0644);
module_param(fw_diag_log, bool, 0644);
module_param_named(coredump_mask, ath10k_coredump_mask, ulong, 0444);
+module_param(override_board, charp, 0644);
+module_param(override_board2, charp, 0644);
+
MODULE_PARM_DESC(debug_mask, "Debugging mask");
MODULE_PARM_DESC(uart_print, "Uart target debugging");
MODULE_PARM_DESC(skip_otp, "Skip otp failure for calibration in testmode");
@@ -55,6 +61,9 @@ MODULE_PARM_DESC(rawmode, "Use raw 802.11 frame datapath");
MODULE_PARM_DESC(coredump_mask, "Bitfield of what to include in firmware crash file");
MODULE_PARM_DESC(fw_diag_log, "Diag based fw log debugging");
+MODULE_PARM_DESC(override_board, "Override for board.bin file");
+MODULE_PARM_DESC(override_board2, "Override for board-2.bin file");
+
static const struct ath10k_hw_params ath10k_hw_params_list[] = {
{
.id = QCA988X_HW_2_0_VERSION,
@@ -809,6 +818,42 @@ static int ath10k_init_configure_target(struct ath10k *ar)
return 0;
}
+static const char *ath10k_override_board_fw_file(struct ath10k *ar,
+ const char *file)
+{
+ if (strcmp(file, "board.bin") == 0) {
+ if (strcmp(override_board, "") == 0)
+ return file;
+
+ if (strcmp(override_board, "none") == 0) {
+ dev_info(ar->dev, "firmware override: pretending 'board.bin' does not exist\n");
+ return NULL;
+ }
+
+ dev_info(ar->dev, "firmware override: replacing 'board.bin' with '%s'\n",
+ override_board);
+
+ return override_board;
+ }
+
+ if (strcmp(file, "board-2.bin") == 0) {
+ if (strcmp(override_board2, "") == 0)
+ return file;
+
+ if (strcmp(override_board2, "none") == 0) {
+ dev_info(ar->dev, "firmware override: pretending 'board-2.bin' does not exist\n");
+ return NULL;
+ }
+
+ dev_info(ar->dev, "firmware override: replacing 'board-2.bin' with '%s'\n",
+ override_board2);
+
+ return override_board2;
+ }
+
+ return file;
+}
+
static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
const char *dir,
const char *file)
@@ -823,6 +868,19 @@ static const struct firmware *ath10k_fetch_fw_file(struct ath10k *ar,
if (dir == NULL)
dir = ".";
+ /* HACK: Override board.bin and board-2.bin files if specified.
+ *
+ * Some Surface devices perform better with a different board
+ * configuration. To this end, one would need to replace the board.bin
+ * file with the modified config and remove the board-2.bin file.
+ * Unfortunately, that's not a solution that we can easily package. So
+ * we add module options to perform these overrides here.
+ */
+
+ file = ath10k_override_board_fw_file(ar, file);
+ if (!file)
+ return ERR_PTR(-ENOENT);
+
snprintf(filename, sizeof(filename), "%s/%s", dir, file);
ret = firmware_request_nowarn(&fw, filename, ar->dev);
ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot fw request '%s': %d\n",
--
2.30.1