aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/mouse/psmouse-base.c
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2017-03-02 14:13:53 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-03-25 10:37:30 -0700
commite839ffab028981ac77f650faf8c84f16e1719738 (patch)
treed1a3b85b2669ae9d3d3b1d17787a095a2cbd5212 /drivers/input/mouse/psmouse-base.c
parentInput: synaptics - split device info into a separate structure (diff)
downloadlinux-dev-e839ffab028981ac77f650faf8c84f16e1719738.tar.xz
linux-dev-e839ffab028981ac77f650faf8c84f16e1719738.zip
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>
Diffstat (limited to 'drivers/input/mouse/psmouse-base.c')
-rw-r--r--drivers/input/mouse/psmouse-base.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
index ab9bfe2af381..f73b47b8c578 100644
--- a/drivers/input/mouse/psmouse-base.c
+++ b/drivers/input/mouse/psmouse-base.c
@@ -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;
}
/*