Skip to content

Commit

Permalink
Input: synaptics - warn the users when there is a better mode
Browse files Browse the repository at this point in the history
The Synaptics touchpads are now either using i2c-hid or rmi-smbus.
Warn the users if they are missing the rmi-smbus modules and have no
chance of reporting correct data.

Signed-off-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
  • Loading branch information
bentiss authored and dtor committed May 30, 2017
1 parent f4947d7 commit f4101ff
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions drivers/input/mouse/synaptics.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ static const char * const smbus_pnp_ids[] = {
NULL
};

static const char * const forcepad_pnp_ids[] = {
"SYN300D",
"SYN3014",
NULL
};

/*
* Send a command to the synpatics touchpad by special commands
*/
Expand Down Expand Up @@ -482,13 +488,6 @@ static const struct min_max_quirk min_max_pnpid_table[] = {
{ }
};

/* This list has been kindly provided by Synaptics. */
static const char * const forcepad_pnp_ids[] = {
"SYN300D",
"SYN3014",
NULL
};

/*****************************************************************************
* Synaptics communications functions
****************************************************************************/
Expand Down Expand Up @@ -1813,6 +1812,15 @@ int synaptics_init(struct psmouse *psmouse)
}

if (SYN_CAP_INTERTOUCH(info.ext_cap_0c)) {
if ((!IS_ENABLED(CONFIG_RMI4_SMB) ||
!IS_ENABLED(CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS)) &&
/* Forcepads need F21, which is not ready */
!psmouse_matches_pnp_id(psmouse, forcepad_pnp_ids)) {
psmouse_warn(psmouse,
"The touchpad can support a better bus than the too old PS/2 protocol. "
"Make sure MOUSE_PS2_SYNAPTICS_SMBUS and RMI4_SMB are enabled to get a better touchpad experience.\n");
}

error = synaptics_setup_intertouch(psmouse, &info, true);
if (!error)
return PSMOUSE_SYNAPTICS_SMBUS;
Expand Down

0 comments on commit f4101ff

Please sign in to comment.