Input: synaptics - properly initialize slots for semi-MT
Subsystems (2)
Dmitry Torokhov
maintainerPATCH 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
@@ -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
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.Reviewed-by Daniel Kurtz <[email protected]>Reviewed-by Benson Leung <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>---
Quoted 28 lines
drivers/input/mouse/synaptics.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/input/mouse/synaptics.c +3
-3@@ -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
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.Reviewed-by Daniel Kurtz <[email protected]>Reviewed-by Benson Leung <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>--- drivers/input/mouse/synaptics.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/input/mouse/synaptics.c +0
-0@@ -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
-0if (SYN_CAP_PALMDETECT (priv->capabilities))
Henrik
Dmitry Torokhov
maintainerQuoted 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.Reviewed-by Daniel Kurtz <[email protected]>Reviewed-by Benson Leung <[email protected]>Signed-off-by Dmitry Torokhov <[email protected]>--- drivers/input/mouse/synaptics.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/input/mouse/synaptics.c +0
-3@@ -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_TAPis 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