summaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/synaptics.c
diff options
context:
space:
mode:
authorDaniel Kurtz <djkurtz@chromium.org>2011-07-06 22:39:14 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-07-06 23:01:09 -0700
commita9f0b79edfda3750d254ba5b192795e2554c361d (patch)
treec7fac3d08d6a031dd6fa356eb68c28c00d4367a6 /drivers/input/mouse/synaptics.c
parent8be3c650f54c259694e82282e54b12c14304487e (diff)
downloadop-kernel-dev-a9f0b79edfda3750d254ba5b192795e2554c361d.zip
op-kernel-dev-a9f0b79edfda3750d254ba5b192795e2554c361d.tar.gz
Input: synaptics - fuzz position for touchpad with reduced filtering
Synaptics touchpads indicate via a capability bit when they perform reduced filtering on position data. In such a case, use a non-zero fuzz value. Fuzz = 8 was chosen empirically by observing the raw position data reported by a clickpad indicating it had reduced filtering. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Acked-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/mouse/synaptics.c')
-rw-r--r--drivers/input/mouse/synaptics.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 477d1ea..363aedf 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -684,23 +684,25 @@ static psmouse_ret_t synaptics_process_byte(struct psmouse *psmouse)
static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
{
int i;
+ int fuzz = SYN_CAP_REDUCED_FILTERING(priv->ext_cap_0c) ?
+ SYN_REDUCED_FILTER_FUZZ : 0;
__set_bit(INPUT_PROP_POINTER, dev->propbit);
__set_bit(EV_ABS, dev->evbit);
- input_set_abs_params(dev, ABS_X,
- XMIN_NOMINAL, priv->x_max ?: XMAX_NOMINAL, 0, 0);
- input_set_abs_params(dev, ABS_Y,
- YMIN_NOMINAL, priv->y_max ?: YMAX_NOMINAL, 0, 0);
+ input_set_abs_params(dev, ABS_X, XMIN_NOMINAL,
+ priv->x_max ?: XMAX_NOMINAL, fuzz, 0);
+ input_set_abs_params(dev, ABS_Y, YMIN_NOMINAL,
+ priv->y_max ?: YMAX_NOMINAL, fuzz, 0);
input_set_abs_params(dev, ABS_PRESSURE, 0, 255, 0, 0);
if (SYN_CAP_ADV_GESTURE(priv->ext_cap_0c)) {
__set_bit(INPUT_PROP_SEMI_MT, dev->propbit);
input_mt_init_slots(dev, 2);
input_set_abs_params(dev, ABS_MT_POSITION_X, XMIN_NOMINAL,
- priv->x_max ?: XMAX_NOMINAL, 0, 0);
+ priv->x_max ?: XMAX_NOMINAL, fuzz, 0);
input_set_abs_params(dev, ABS_MT_POSITION_Y, YMIN_NOMINAL,
- priv->y_max ?: YMAX_NOMINAL, 0, 0);
+ priv->y_max ?: YMAX_NOMINAL, fuzz, 0);
input_abs_set_res(dev, ABS_MT_POSITION_X, priv->x_res);
input_abs_set_res(dev, ABS_MT_POSITION_Y, priv->y_res);
@@ -974,4 +976,3 @@ bool synaptics_supported(void)
}
#endif /* CONFIG_MOUSE_PS2_SYNAPTICS */
-
OpenPOWER on IntegriCloud