c7caeec62c
Update patches via linux-surface/kernel@fccd0a489e. Updated patches: pick ea097eb Add secureboot pre-signing to the kernel pick b50d617 surface3-power pick 71ab90b surface3-spi pick f109cbf surface3-oemb pick c924fb6 surface-buttons f 1a44682d3bea Input: soc_button_array - fix Wdiscarded-qualifiers for kernels below 4.20 pick 91a78cc surface-sam pick 263250b suspend pick 5ae0ab6 ipts f a5db77a8ad47 ipts: Simplify feedback implementation f 22c959edeaf2 ipts: Remove no_feedback quirk f 21a71ef429b4 ipts: Remove quirk implementation f f28c0f7b64aa ipts: companion: improve comment for hardware id on SP4 pick df219c0 surface-lte pick 3484574 ioremap_uc pick 4f727ac wifi f f86788d75e54 Revert "BACKPORT: wireless/mwifiex: Fix S0ix / suspend" f 169bb34570af mwifiex: pcie: Use dev_get_drvdata f 6e9eefbca821 mwifiex_pcie: remove()/probe() card on suspend()/resume() f 3619cec06fdc mwifiex_pcie: disable parent bridge_d3 f fda9d444d14d mwifiex: sta_cmd: do not enable auto_ds by default f 74ab58241354 mwifiex: sta_cmd: add comment for not enabling ps_mode by default Note: almost all part of the ioremap_uc patch is now upstream. So, the remaining unupstreamed patch is now only linux-surface/kernel@de067f5c12 ("docs: driver-model: add devm_ioremap_uc") Signed-off-by: Tsuchiya Yuto (kitakar5525) <kitakar@gmail.com>
64 lines
1.8 KiB
Diff
64 lines
1.8 KiB
Diff
From 06e4d51c83a77d54ca5b1d402fb57554c51d3926 Mon Sep 17 00:00:00 2001
|
|
From: kitakar5525 <34676735+kitakar5525@users.noreply.github.com>
|
|
Date: Fri, 6 Dec 2019 23:10:30 +0900
|
|
Subject: [PATCH 02/10] surface3-spi
|
|
|
|
---
|
|
drivers/input/touchscreen/surface3_spi.c | 26 ++++++++++++++++++++++++
|
|
1 file changed, 26 insertions(+)
|
|
|
|
diff --git a/drivers/input/touchscreen/surface3_spi.c b/drivers/input/touchscreen/surface3_spi.c
|
|
index 5db0f1c4ef38..8935ddbc2357 100644
|
|
--- a/drivers/input/touchscreen/surface3_spi.c
|
|
+++ b/drivers/input/touchscreen/surface3_spi.c
|
|
@@ -29,6 +29,12 @@
|
|
#define SURFACE3_REPORT_TOUCH 0xd2
|
|
#define SURFACE3_REPORT_PEN 0x16
|
|
|
|
+bool use_dma = false;
|
|
+module_param(use_dma, bool, 0644);
|
|
+MODULE_PARM_DESC(use_dma,
|
|
+ "Disable DMA mode if you encounter touch input crash. "
|
|
+ "(default: false, disabled to avoid crash)");
|
|
+
|
|
struct surface3_ts_data {
|
|
struct spi_device *spi;
|
|
struct gpio_desc *gpiod_rst[2];
|
|
@@ -330,6 +336,13 @@ static int surface3_spi_create_pen_input(struct surface3_ts_data *data)
|
|
return 0;
|
|
}
|
|
|
|
+static bool surface3_spi_can_dma(struct spi_controller *ctlr,
|
|
+ struct spi_device *spi,
|
|
+ struct spi_transfer *tfr)
|
|
+{
|
|
+ return use_dma;
|
|
+}
|
|
+
|
|
static int surface3_spi_probe(struct spi_device *spi)
|
|
{
|
|
struct surface3_ts_data *data;
|
|
@@ -372,6 +385,19 @@ static int surface3_spi_probe(struct spi_device *spi)
|
|
if (error)
|
|
return error;
|
|
|
|
+ /*
|
|
+ * Set up DMA
|
|
+ *
|
|
+ * TODO: Currently, touch input with DMA seems to be broken.
|
|
+ * On 4.19 LTS, touch input will crash after suspend.
|
|
+ * On recent stable kernel (at least after 5.1), touch input will crash after
|
|
+ * the first touch. No problem with PIO on those kernels.
|
|
+ * Maybe we need to configure DMA here.
|
|
+ *
|
|
+ * Link to issue: https://github.com/jakeday/linux-surface/issues/596
|
|
+ */
|
|
+ spi->controller->can_dma = surface3_spi_can_dma;
|
|
+
|
|
return 0;
|
|
}
|
|
|
|
--
|
|
2.26.2
|
|
|