[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1420496915-31560-5-git-send-email-gabriele.mzt@gmail.com>
Date: Mon, 5 Jan 2015 23:28:35 +0100
From: Gabriele Mazzotta <gabriele.mzt@...il.com>
To: linux-input@...r.kernel.org
Cc: dmitry.torokhov@...il.com, rydberg@...omail.se,
linux-kernel@...r.kernel.org, silverhammermba@...il.com,
peter.hutterer@...-t.net, hdegoede@...hat.com,
benjamin.tissoires@...il.com,
Gabriele Mazzotta <gabriele.mzt@...il.com>
Subject: [PATCH v2 4/4] input: synaptics - make semi-mt touchpads report widths
Despite claiming to report finger widths, semi-mt touchpads were not
doing it. Make them report widths using ABS_MT_TOUCH_MAJOR instead
of ABS_TOOL_WIDTH.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=77161
Signed-off-by: Gabriele Mazzotta <gabriele.mzt@...il.com>
---
drivers/input/mouse/synaptics.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 5008e8c..7b95a0b 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -819,6 +819,7 @@ static void synaptics_report_mt_data(struct psmouse *psmouse,
input_report_abs(dev, ABS_MT_POSITION_X, pos[i].x);
input_report_abs(dev, ABS_MT_POSITION_Y, pos[i].y);
input_report_abs(dev, ABS_MT_PRESSURE, hw[i]->z);
+ input_report_abs(dev, ABS_MT_TOUCH_MAJOR, hw[i]->w);
}
input_mt_drop_unused(dev);
@@ -954,8 +955,14 @@ static void synaptics_process_packet(struct psmouse *psmouse)
}
input_report_abs(dev, ABS_PRESSURE, hw.z);
- if (SYN_CAP_PALMDETECT(priv->capabilities))
- input_report_abs(dev, ABS_TOOL_WIDTH, finger_width);
+ if (SYN_CAP_PALMDETECT(priv->capabilities)) {
+ if (SYN_CAP_IMAGE_SENSOR(priv->ext_cap_0c) ||
+ cr48_profile_sensor)
+ input_set_abs_params(dev,
+ ABS_MT_TOUCH_MAJOR, 4, 15, 0, 0);
+ else
+ input_set_abs_params(dev, ABS_TOOL_WIDTH, 0, 15, 0, 0);
+ }
input_report_key(dev, BTN_TOOL_FINGER, num_fingers == 1);
if (SYN_CAP_MULTIFINGER(priv->capabilities)) {
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists