summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2021-04-10 00:33:46 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-04-10 00:46:09 -0700
commitddfe7e1ce3d5ce5ae0b25d107ba9d26fe8a4923b (patch)
tree194efcf2ce5fc6def4cba8e8047f4f0080d8eb0f /drivers/input
parent0bffa508d1365794b7688b9a2d1ad5af63434b58 (diff)
Input: cyttsp - set abs params for ABS_MT_TOUCH_MAJOR
The driver is certainly reporting pressure in cyttsp_report_tchdata() with input_report_abs(input, ABS_MT_TOUCH_MAJOR, tch->z); so we should also advertise this capability. Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20210408131153.3446138-8-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/cyttsp_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/cyttsp_core.c b/drivers/input/touchscreen/cyttsp_core.c
index b0477f55fb79..3d605f4cbed9 100644
--- a/drivers/input/touchscreen/cyttsp_core.c
+++ b/drivers/input/touchscreen/cyttsp_core.c
@@ -652,6 +652,9 @@ struct cyttsp *cyttsp_probe(const struct cyttsp_bus_ops *bus_ops,
input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_X);
input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_Y);
+ /* One byte for width 0..255 so this is the limit */
+ input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0);
+
touchscreen_parse_properties(input_dev, true, NULL);
error = input_mt_init_slots(input_dev, CY_MAX_ID, 0);