linux-xiaomi-lavender: unbreak libinput (MR 1444)
Signed-off-by: Danct12 <danct12@disroot.org>
This commit is contained in:
parent
13b4e78338
commit
0a99b6c27d
@ -0,0 +1,60 @@
|
||||
From 674e10330546921dca7308fad44f593741f8db23 Mon Sep 17 00:00:00 2001
|
||||
From: Danct12 <danct12@disroot.org>
|
||||
Date: Tue, 17 Mar 2020 10:16:31 +0700
|
||||
Subject: [PATCH] driver: touchscreen: nvt_touch_f7a: do not report
|
||||
ABS_MT_TOUCH_MAJOR/ABS_MT_WIDTH_MAJOR
|
||||
|
||||
It seems touchscreen chip can only report touch pressure from 0 to 255,
|
||||
which should be ABS_MT_PRESSURE according to
|
||||
https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt.
|
||||
|
||||
Do not set same values to ABS_MT_TOUCH_MAJOR/ABS_MT_WIDTH_MAJOR to avoid
|
||||
breaking libinput and software.
|
||||
|
||||
Thanks @NotKit!
|
||||
|
||||
Signed-off-by: Danct12 <danct12@disroot.org>
|
||||
---
|
||||
drivers/input/touchscreen/nvt_touch_f7a/nt36xxx.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/drivers/input/touchscreen/nvt_touch_f7a/nt36xxx.c b/drivers/input/touchscreen/nvt_touch_f7a/nt36xxx.c
|
||||
index 9a3c1638b6a2..ad4dda241145 100644
|
||||
--- a/drivers/input/touchscreen/nvt_touch_f7a/nt36xxx.c
|
||||
+++ b/drivers/input/touchscreen/nvt_touch_f7a/nt36xxx.c
|
||||
@@ -1030,7 +1030,7 @@ static void nvt_ts_work_func(struct work_struct *work)
|
||||
input_report_abs(ts->input_dev, ABS_MT_POSITION_X, input_x);
|
||||
input_report_abs(ts->input_dev, ABS_MT_POSITION_Y, input_y);
|
||||
#if ENABLE_TOUCH_SZIE
|
||||
- input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, input_w);
|
||||
+ //input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, input_w);
|
||||
#endif
|
||||
input_report_abs(ts->input_dev, ABS_MT_PRESSURE, input_p);
|
||||
|
||||
@@ -1048,7 +1048,7 @@ static void nvt_ts_work_func(struct work_struct *work)
|
||||
if (press_id[i] != 1) {
|
||||
input_mt_slot(ts->input_dev, i);
|
||||
#if ENABLE_TOUCH_SZIE
|
||||
- input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0);
|
||||
+ //input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0);
|
||||
#endif
|
||||
input_report_abs(ts->input_dev, ABS_MT_PRESSURE, 0);
|
||||
input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER, false);
|
||||
@@ -1427,7 +1427,7 @@ static int32_t nvt_ts_probe(struct i2c_client *client, const struct i2c_device_i
|
||||
|
||||
#if TOUCH_MAX_FINGER_NUM > 1
|
||||
#if ENABLE_TOUCH_SZIE
|
||||
- input_set_abs_params(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
|
||||
+ //input_set_abs_params(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
|
||||
#endif
|
||||
input_set_abs_params(ts->input_dev, ABS_MT_POSITION_X, 0, ts->abs_x_max-1, 0, 0);
|
||||
input_set_abs_params(ts->input_dev, ABS_MT_POSITION_Y, 0, ts->abs_y_max-1, 0, 0);
|
||||
@@ -1708,7 +1708,7 @@ static int32_t nvt_ts_suspend(struct device *dev)
|
||||
for (i = 0; i < ts->max_touch_num; i++) {
|
||||
input_mt_slot(ts->input_dev, i);
|
||||
#if ENABLE_TOUCH_SZIE
|
||||
- input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0);
|
||||
+ //input_report_abs(ts->input_dev, ABS_MT_TOUCH_MAJOR, 0);
|
||||
#endif
|
||||
input_report_abs(ts->input_dev, ABS_MT_PRESSURE, 0);
|
||||
input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER, 0);
|
@ -5,7 +5,7 @@
|
||||
|
||||
pkgname=linux-xiaomi-lavender
|
||||
pkgver=4.4.156
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc="Xiaomi Redmi Note 7 kernel fork"
|
||||
arch="aarch64"
|
||||
_carch="arm64"
|
||||
@ -35,6 +35,7 @@ source="
|
||||
0004-Reduce-battery-spam-in-dmesg.patch
|
||||
0005-Adds-and-sets-BGRA-as-default.patch
|
||||
0006-mdss-panel-to-fb-var.patch
|
||||
0007-nvt-touch-f7a-unbreak-libinput.patch
|
||||
"
|
||||
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
@ -65,4 +66,5 @@ a8713d22404a5e2c0d2add3deb4cb033e972bd1983e10f1557d4de640c1329af50be2bfd92dc3cf7
|
||||
9ce867c4254b537ef5d2485780c26b72da8a3a8767ba71557f3b48d6c550e0e14c8c3e575b31bf65d2878f08a8a4926e48a1c2f1be534bf80a7a57f58313b0fd 0003-Add-config-option-to-fix-bootloader-cmdline-args.patch
|
||||
066ac4b77388fd2001df227db216da9f435e06d29ce1be59d8a8923613f3390e154cb5b6cb7785614a3a4b12c01d9f1b84dfd09b884dede3fa6d0e5b1ddb9045 0004-Reduce-battery-spam-in-dmesg.patch
|
||||
f2a97a9500b6155a11f2341a8fd4b083ceb25a17d656c7975e34b9f3d8bacb495ae687f823db5fd07ddee27b2d95021f193bfadb5274185334255cda12bc85ce 0005-Adds-and-sets-BGRA-as-default.patch
|
||||
d5b868c64b8ebddcf74cb3aa478f30f0897af1e14e4fc42d977921104a6c568cc0bf36fc8a3b0f538cd3ca2ebf59244fdf23186a903259e5acc14d1c4ef4ccc3 0006-mdss-panel-to-fb-var.patch"
|
||||
d5b868c64b8ebddcf74cb3aa478f30f0897af1e14e4fc42d977921104a6c568cc0bf36fc8a3b0f538cd3ca2ebf59244fdf23186a903259e5acc14d1c4ef4ccc3 0006-mdss-panel-to-fb-var.patch
|
||||
e13adff827073edfaded0a34a1f913b7341069d062552f1444c3de390c3b3b08bf3cd4ad8cdf0f76c6be084ccc14469492a535a96022a0729ce56b3b09cfdfec 0007-nvt-touch-f7a-unbreak-libinput.patch"
|
||||
|
Loading…
x
Reference in New Issue
Block a user