Skip to contentSkip to conversation

Input: synaptics - properly initialize slots for semi-MT

PATCH In review Dmitry Torokhov 3 participants 4 messages Jul 26, 2014

Subsystems (2)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/1 Input: synaptics - properly initialize slots for semi-MT

Semi-MT devices are pointers too, so let's tell that to input_mt_init_slots(), as well as let it set up the devices as semi-MT, instead of us doing it manually.

---
 drivers/input/mouse/synaptics.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/input/mouse/synaptics.c +3 -3
index ef9e0b8..fe607e9 100644
@@ -1371,11 +1371,11 @@ static void set_input_params(struct psmouse *psmouse,
 		__set_bit(BTN_TOOL_QUADTAP, dev->keybit);
 		__set_bit(BTN_TOOL_QUINTTAP, dev->keybit);
 	} else if (SYN_CAP_ADV_GESTURE(priv->ext_cap_0c)) {
-		/* Non-image sensors with AGM use semi-mt */
-		__set_bit(INPUT_PROP_SEMI_MT, dev->propbit);
-		input_mt_init_slots(dev, 2, 0);
 		set_abs_position_params(dev, priv, ABS_MT_POSITION_X,
 					ABS_MT_POSITION_Y);
+		/* Non-image sensors with AGM use semi-mt */
+		input_mt_init_slots(dev, 2,
+				    INPUT_MT_POINTER | INPUT_MT_SEMI_MT);
 	}
 
 	if (SYN_CAP_PALMDETECT(priv->capabilities))
Signature · 5 lines
2.0.0.526.g5318336


-- 
Dmitry
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Dmitry Torokhov

Semi-MT devices are pointers too, so let's tell that to input_mt_init_slots(), as well as let it set up the devices as semi-MT, instead of us doing it manually.

---

Quoted 28 lines
 drivers/input/mouse/synaptics.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/input/mouse/synaptics.c +3 -3
index ef9e0b8..fe607e9 100644
@@ -1371,11 +1371,11 @@ static void set_input_params(struct psmouse *psmouse,
 		__set_bit(BTN_TOOL_QUADTAP, dev->keybit);
 		__set_bit(BTN_TOOL_QUINTTAP, dev->keybit);
 	} else if (SYN_CAP_ADV_GESTURE(priv->ext_cap_0c)) {
-		/* Non-image sensors with AGM use semi-mt */
-		__set_bit(INPUT_PROP_SEMI_MT, dev->propbit);
-		input_mt_init_slots(dev, 2, 0);
 		set_abs_position_params(dev, priv, ABS_MT_POSITION_X,
 					ABS_MT_POSITION_Y);
+		/* Non-image sensors with AGM use semi-mt */
+		input_mt_init_slots(dev, 2,
+				    INPUT_MT_POINTER | INPUT_MT_SEMI_MT);
 	}
 
 	if (SYN_CAP_PALMDETECT(priv->capabilities))
Signature · 5 lines
2.0.0.526.g5318336


-- 
Dmitry
#2 lore raw
In reply to Dmitry Torokhov

Hi Dmitry,

Quoted 18 lines · Dmitry Torokhov

Semi-MT devices are pointers too, so let's tell that to input_mt_init_slots(), as well as let it set up the devices as semi-MT, instead of us doing it manually.

---
 drivers/input/mouse/synaptics.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/input/mouse/synaptics.c +0 -0
index ef9e0b8..fe607e9 100644
@@ -1371,11 +1371,11 @@ static void set_input_params(struct psmouse *psmouse,
 		__set_bit(BTN_TOOL_QUADTAP, dev->keybit);
 		__set_bit(BTN_TOOL_QUINTTAP, dev->keybit);

drivers/input/mouse/synaptics.c static void set_input_params(struct psmouse *psmouse, · line 1379

Quoted 10 lines
drivers/input/mouse/synaptics.c +3 -3
 	} else if (SYN_CAP_ADV_GESTURE(priv->ext_cap_0c)) {
-		/* Non-image sensors with AGM use semi-mt */
-		__set_bit(INPUT_PROP_SEMI_MT, dev->propbit);
-		input_mt_init_slots(dev, 2, 0);
 		set_abs_position_params(dev, priv, ABS_MT_POSITION_X,
 					ABS_MT_POSITION_Y);
+		/* Non-image sensors with AGM use semi-mt */
+		input_mt_init_slots(dev, 2,
+				    INPUT_MT_POINTER | INPUT_MT_SEMI_MT);
 	}

As long as DOUBLE_TAP is set unconditionally in this path anyways, it should be ok. I have a vague memory of refraining from this exact change at some point, because of the many branches of settings.

drivers/input/mouse/synaptics.c static void set_input_params(struct psmouse *psmouse, · line 1381

Quoted 3 lines
drivers/input/mouse/synaptics.c +0 -0
 	if (SYN_CAP_PALMDETECT(priv->capabilities))
 

Henrik

author maintainer
#3 lore raw
Quoted 27 lines · Henrik Rydberg

Hi Dmitry,

Quoted 24 lines · Dmitry Torokhov

Semi-MT devices are pointers too, so let's tell that to input_mt_init_slots(), as well as let it set up the devices as semi-MT, instead of us doing it manually.

---
 drivers/input/mouse/synaptics.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/input/mouse/synaptics.c +0 -3
index ef9e0b8..fe607e9 100644
@@ -1371,11 +1371,11 @@ static void set_input_params(struct psmouse *psmouse,
 		__set_bit(BTN_TOOL_QUADTAP, dev->keybit);
 		__set_bit(BTN_TOOL_QUINTTAP, dev->keybit);
 	} else if (SYN_CAP_ADV_GESTURE(priv->ext_cap_0c)) {
-		/* Non-image sensors with AGM use semi-mt */
-		__set_bit(INPUT_PROP_SEMI_MT, dev->propbit);
-		input_mt_init_slots(dev, 2, 0);
 		set_abs_position_params(dev, priv, ABS_MT_POSITION_X,
 					ABS_MT_POSITION_Y);
Quoted 8 lines

drivers/input/mouse/synaptics.c static void set_input_params(struct psmouse *psmouse, · line 1379

Quoted 4 lines
drivers/input/mouse/synaptics.c +3 -0
+		/* Non-image sensors with AGM use semi-mt */
+		input_mt_init_slots(dev, 2,
+				    INPUT_MT_POINTER | INPUT_MT_SEMI_MT);
 	}

As long as DOUBLE_TAP is set unconditionally in this path anyways, it should be ok. I have a vague memory of refraining from this exact change at some point, because of the many branches of settings.

Yes, it is, as we should be hitting the multi-finger capability check below.

Thanks.

Signature · 1 line
Dmitry