touchpad: add pressure ranges for cyapa touchpads

https://bugs.freedesktop.org/show_bug.cgi?id=100122

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Peter Hutterer 2017-03-13 09:29:06 +10:00
parent e3d04088bd
commit 17e9dfd0d1

View file

@ -2385,6 +2385,9 @@ tp_init_pressure(struct tp_dispatch *tp,
if (device->model_flags & EVDEV_MODEL_ELANTECH_TOUCHPAD) {
tp->pressure.high = 24;
tp->pressure.low = 10;
} else if (device->model_flags & EVDEV_MODEL_CYAPA) {
tp->pressure.high = 10;
tp->pressure.low = 8;
} else {
/* Approximately the synaptics defaults */
tp->pressure.high = abs->minimum + 0.12 * range;