Input: synaptics - add support for Intertouch devices

Most of the Synaptics devices are connected through PS/2 and a different
bus (SMBus or HID over I2C). The secondary bus capability is indicated by
the InterTouch bit in extended capability 0x0C.

We only enable the InterTouch device to be created for the laptops
registered with the top software button property or those we know that are
functional. In the future, we might change the default to always rely on
the InterTouch bus. Currently, users can enable/disable the feature with
the psmouse parameter synaptics_intertouch.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
Benjamin Tissoires
2017-03-02 14:13:53 -08:00
committed by Dmitry Torokhov
parent 6c53694fb2
commit e839ffab02
5 changed files with 425 additions and 179 deletions

View File

@@ -773,7 +773,7 @@ static const struct psmouse_protocol psmouse_protocols[] = {
.name = "SynPS/2",
.alias = "synaptics",
.detect = synaptics_detect,
.init = synaptics_init,
.init = synaptics_init_absolute,
},
{
.type = PSMOUSE_SYNAPTICS_RELATIVE,
@@ -783,6 +783,16 @@ static const struct psmouse_protocol psmouse_protocols[] = {
.init = synaptics_init_relative,
},
#endif
#ifdef CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS
{
.type = PSMOUSE_SYNAPTICS_SMBUS,
.name = "SynSMBus",
.alias = "synaptics-smbus",
.detect = synaptics_detect,
.init = synaptics_init_smbus,
.smbus_companion = true,
},
#endif
#ifdef CONFIG_MOUSE_PS2_ALPS
{
.type = PSMOUSE_ALPS,
@@ -1011,6 +1021,7 @@ static int psmouse_extensions(struct psmouse *psmouse,
unsigned int max_proto, bool set_properties)
{
bool synaptics_hardware = false;
int ret;
/*
* Always check for focaltech, this is safe as it uses pnp-id
@@ -1073,9 +1084,14 @@ static int psmouse_extensions(struct psmouse *psmouse,
* enabled first, since we try detecting Synaptics
* even when protocol is disabled.
*/
if (IS_ENABLED(CONFIG_MOUSE_PS2_SYNAPTICS) &&
(!set_properties || synaptics_init(psmouse) == 0)) {
return PSMOUSE_SYNAPTICS;
if (IS_ENABLED(CONFIG_MOUSE_PS2_SYNAPTICS) ||
IS_ENABLED(CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS)) {
if (!set_properties)
return PSMOUSE_SYNAPTICS;
ret = synaptics_init(psmouse);
if (ret >= 0)
return ret;
}
/*