diff mbox

[2/3] Input: synaptics - warn the users when there is a better mode

Message ID 20170523083657.11148-2-benjamin.tissoires@redhat.com (mailing list archive)
State Accepted
Headers show

Commit Message

Benjamin Tissoires May 23, 2017, 8:36 a.m. UTC
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 <benjamin.tissoires@redhat.com>
---
 drivers/input/mouse/synaptics.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Dmitry Torokhov May 23, 2017, 9:20 p.m. UTC | #1
On Tue, May 23, 2017 at 10:36:56AM +0200, Benjamin Tissoires wrote:
> 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 <benjamin.tissoires@redhat.com>
> ---
>  drivers/input/mouse/synaptics.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index 58ff388..fc42259 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -1814,6 +1814,10 @@ int synaptics_init(struct psmouse *psmouse)
>  	}
>  
>  	if (SYN_CAP_INTERTOUCH(info.ext_cap_0c)) {
> +#if !IS_ENABLED(CONFIG_RMI4_SMB) || !defined(CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS)
> +		psmouse_warn(psmouse, "The touchpad can support a better bus than the too old PS/2 protocol.\n"
> +			"Make sure MOUSE_PS2_SYNAPTICS_SMBUS and RMI4_SMB are enabled to get a better touchpad experience.\n");
> +#endif

I'll pull the checks into "if" to avoid preprocessor and also add checks
for forcepad PNP IDs as forcepads are not usable with RMI at the moment
since they need F21.

>  		error = synaptics_setup_intertouch(psmouse, &info, true);
>  		if (!error)
>  			return PSMOUSE_SYNAPTICS_SMBUS;
> -- 
> 2.9.4
> 

Thanks.
Dmitry Torokhov May 30, 2017, 3:17 a.m. UTC | #2
On Tue, May 23, 2017 at 02:20:51PM -0700, Dmitry Torokhov wrote:
> On Tue, May 23, 2017 at 10:36:56AM +0200, Benjamin Tissoires wrote:
> > 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 <benjamin.tissoires@redhat.com>
> > ---
> >  drivers/input/mouse/synaptics.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> > index 58ff388..fc42259 100644
> > --- a/drivers/input/mouse/synaptics.c
> > +++ b/drivers/input/mouse/synaptics.c
> > @@ -1814,6 +1814,10 @@ int synaptics_init(struct psmouse *psmouse)
> >  	}
> >  
> >  	if (SYN_CAP_INTERTOUCH(info.ext_cap_0c)) {
> > +#if !IS_ENABLED(CONFIG_RMI4_SMB) || !defined(CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS)
> > +		psmouse_warn(psmouse, "The touchpad can support a better bus than the too old PS/2 protocol.\n"
> > +			"Make sure MOUSE_PS2_SYNAPTICS_SMBUS and RMI4_SMB are enabled to get a better touchpad experience.\n");
> > +#endif
> 
> I'll pull the checks into "if" to avoid preprocessor and also add checks
> for forcepad PNP IDs as forcepads are not usable with RMI at the moment
> since they need F21.

I made the changes I mentioned and pushed to my for-linus branch, please
take a peek and yell if I screwed up.

> 
> >  		error = synaptics_setup_intertouch(psmouse, &info, true);
> >  		if (!error)
> >  			return PSMOUSE_SYNAPTICS_SMBUS;
> > -- 
> > 2.9.4
> > 
> 
> Thanks.
> 
> -- 
> Dmitry
Benjamin Tissoires May 30, 2017, 8:16 a.m. UTC | #3
On May 29 2017 or thereabouts, Dmitry Torokhov wrote:
> On Tue, May 23, 2017 at 02:20:51PM -0700, Dmitry Torokhov wrote:
> > On Tue, May 23, 2017 at 10:36:56AM +0200, Benjamin Tissoires wrote:
> > > 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 <benjamin.tissoires@redhat.com>
> > > ---
> > >  drivers/input/mouse/synaptics.c | 4 ++++
> > >  1 file changed, 4 insertions(+)
> > > 
> > > diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> > > index 58ff388..fc42259 100644
> > > --- a/drivers/input/mouse/synaptics.c
> > > +++ b/drivers/input/mouse/synaptics.c
> > > @@ -1814,6 +1814,10 @@ int synaptics_init(struct psmouse *psmouse)
> > >  	}
> > >  
> > >  	if (SYN_CAP_INTERTOUCH(info.ext_cap_0c)) {
> > > +#if !IS_ENABLED(CONFIG_RMI4_SMB) || !defined(CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS)
> > > +		psmouse_warn(psmouse, "The touchpad can support a better bus than the too old PS/2 protocol.\n"
> > > +			"Make sure MOUSE_PS2_SYNAPTICS_SMBUS and RMI4_SMB are enabled to get a better touchpad experience.\n");
> > > +#endif
> > 
> > I'll pull the checks into "if" to avoid preprocessor and also add checks
> > for forcepad PNP IDs as forcepads are not usable with RMI at the moment
> > since they need F21.
> 
> I made the changes I mentioned and pushed to my for-linus branch, please
> take a peek and yell if I screwed up.

Looks good to me, thanks!

Cheers,
Benjamin

> 
> > 
> > >  		error = synaptics_setup_intertouch(psmouse, &info, true);
> > >  		if (!error)
> > >  			return PSMOUSE_SYNAPTICS_SMBUS;
> > > -- 
> > > 2.9.4
> > > 
> > 
> > Thanks.
> > 
> > -- 
> > Dmitry
> 
> -- 
> Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 58ff388..fc42259 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -1814,6 +1814,10 @@  int synaptics_init(struct psmouse *psmouse)
 	}
 
 	if (SYN_CAP_INTERTOUCH(info.ext_cap_0c)) {
+#if !IS_ENABLED(CONFIG_RMI4_SMB) || !defined(CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS)
+		psmouse_warn(psmouse, "The touchpad can support a better bus than the too old PS/2 protocol.\n"
+			"Make sure MOUSE_PS2_SYNAPTICS_SMBUS and RMI4_SMB are enabled to get a better touchpad experience.\n");
+#endif
 		error = synaptics_setup_intertouch(psmouse, &info, true);
 		if (!error)
 			return PSMOUSE_SYNAPTICS_SMBUS;