Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c14890a8 authored by Henrik Rydberg's avatar Henrik Rydberg
Browse files

Input: synaptics - report clickpad property



With the new input property interface, it is possible to report the
special quirks of a device using ioctl/sysfs. This patch sets up the
device as a pointer, and reports the clickpad functionality via the
INPUT_PROP_BUTTONPAD property.

Acked-by: default avatarChase Douglas <chase.douglas@canonical.com>
Signed-off-by: default avatarHenrik Rydberg <rydberg@euromail.se>
parent 22f075a8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -622,6 +622,8 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
{
	int i;

	__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);
@@ -663,6 +665,7 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
	input_abs_set_res(dev, ABS_Y, priv->y_res);

	if (SYN_CAP_CLICKPAD(priv->ext_cap_0c)) {
		__set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
		/* Clickpads report only left button */
		__clear_bit(BTN_RIGHT, dev->keybit);
		__clear_bit(BTN_MIDDLE, dev->keybit);