[PATCH v4 4/4] input: synaptics - make image sensors and cr48 sensors report widths

From: Gabriele Mazzotta
Date: Fri Apr 01 2016 - 09:07:42 EST


Despite claiming to report finger widths, image sensors and cr48
profile sensors were not doing it. Since the touchpad uses an
abstract unit for the width of the fingers, report only the witdh
of the first touch using ABS_TOOL_WIDTH.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=77161
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@xxxxxxxxx>
---
drivers/input/mouse/synaptics.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 27a091b..bed268b 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -943,6 +943,8 @@ static void synaptics_report_mt_data(struct psmouse *psmouse,
input_report_abs(dev, ABS_MT_PRESSURE, hw[i]->z);
}

+ input_report_abs(dev, ABS_TOOL_WIDTH, hw[0]->w);
+
input_mt_drop_unused(dev);

/* Don't use active slot count to generate BTN_TOOL events. */
--
2.8.0.rc3