Skip to contentSkip to conversation

Patch "Input: stmfts - fix setting ABS_MT_POSITION_* maximum size" has been added to the 4.13-stable tree

PATCH [email protected] 1 participant 1 message Oct 24, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

Input: stmfts - fix setting ABS_MT_POSITION_* maximum size

to the 4.13-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
input-stmfts-fix-setting-abs_mt_position_-maximum-size.patch
and it can be found in the queue-4.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From c9bfb2f0031a2de664147ebbfb90f95bb12fdf79 Mon Sep 17 00:00:00 2001

From: Chanwoo Choi <[email protected]>
Date: Wed, 18 Oct 2017 17:28:36 -0700
Subject: Input: stmfts - fix setting ABS_MT_POSITION_* maximum size

From: Chanwoo Choi <[email protected]>

commit c9bfb2f0031a2de664147ebbfb90f95bb12fdf79 upstream.

The commit 78bcac7b2ae1e ("Input: add support for the STMicroelectronics FingerTip touchscreen) used the 'touchscreen_parse_properties()' helper function in order to get the value of common properties.

But, commit 78bcac7b2ae1e didn't set the capability of ABS_MT_POSITION_* before calling touchscreen_parse_properties(). In result, the max_x and max_y of 'struct touchscreen_properties' were not set.

Fixes 78bcac7b2ae1e ("Input: add support for the STMicroelectronics FingerTip touchscreen")
---
 drivers/input/touchscreen/stmfts.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/input/touchscreen/stmfts.c +2 -4
@@ -663,12 +663,10 @@ static int stmfts_probe(struct i2c_clien
 	sdata->input->open = stmfts_input_open;
 	sdata->input->close = stmfts_input_close;
 
+	input_set_capability(sdata->input, EV_ABS, ABS_MT_POSITION_X);
+	input_set_capability(sdata->input, EV_ABS, ABS_MT_POSITION_Y);
 	touchscreen_parse_properties(sdata->input, true, &sdata->prop);
 
-	input_set_abs_params(sdata->input, ABS_MT_POSITION_X, 0,
-						sdata->prop.max_x, 0, 0);
-	input_set_abs_params(sdata->input, ABS_MT_POSITION_Y, 0,
-						sdata->prop.max_y, 0, 0);
 	input_set_abs_params(sdata->input, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
 	input_set_abs_params(sdata->input, ABS_MT_TOUCH_MINOR, 0, 255, 0, 0);
 	input_set_abs_params(sdata->input, ABS_MT_ORIENTATION, 0, 255, 0, 0);

Patches currently in stable-queue which might be from [email protected] are

queue-4.13/input-stmfts-fix-setting-abs_mt_position_-maximum-size.patch