linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is not compiled in
@ 2017-05-23  8:36 Benjamin Tissoires
  2017-05-23  8:36 ` [PATCH 2/3] Input: synaptics - warn the users when there is a better mode Benjamin Tissoires
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Benjamin Tissoires @ 2017-05-23  8:36 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, linux-kernel

Or the user might have the touchpad unbound from PS/2 but never picked
up by rmi-smbus.ko

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 131df9d..58ff388 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -1687,7 +1687,11 @@ enum {
 	SYNAPTICS_INTERTOUCH_ON,
 };
 
+#if IS_ENABLED(CONFIG_RMI4_SMB)
 static int synaptics_intertouch = SYNAPTICS_INTERTOUCH_NOT_SET;
+#else /* CONFIG_RMI4_SMB */
+static int synaptics_intertouch = SYNAPTICS_INTERTOUCH_OFF;
+#endif /* CONFIG_RMI4_SMB */
 module_param_named(synaptics_intertouch, synaptics_intertouch, int, 0644);
 MODULE_PARM_DESC(synaptics_intertouch, "Use a secondary bus for the Synaptics device.");
 
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] Input: synaptics - warn the users when there is a better mode
  2017-05-23  8:36 [PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is not compiled in Benjamin Tissoires
@ 2017-05-23  8:36 ` Benjamin Tissoires
  2017-05-23 21:20   ` Dmitry Torokhov
  2017-05-23  8:36 ` [PATCH 3/3] Input: synaptics - tell users to report when they should be using rmi-smbus Benjamin Tissoires
  2017-05-23 21:18 ` [PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is not compiled in Dmitry Torokhov
  2 siblings, 1 reply; 7+ messages in thread
From: Benjamin Tissoires @ 2017-05-23  8:36 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, linux-kernel

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
 		error = synaptics_setup_intertouch(psmouse, &info, true);
 		if (!error)
 			return PSMOUSE_SYNAPTICS_SMBUS;
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] Input: synaptics - tell users to report when they should be using rmi-smbus
  2017-05-23  8:36 [PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is not compiled in Benjamin Tissoires
  2017-05-23  8:36 ` [PATCH 2/3] Input: synaptics - warn the users when there is a better mode Benjamin Tissoires
@ 2017-05-23  8:36 ` Benjamin Tissoires
  2017-05-23 21:18 ` [PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is not compiled in Dmitry Torokhov
  2 siblings, 0 replies; 7+ messages in thread
From: Benjamin Tissoires @ 2017-05-23  8:36 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, linux-kernel

Users should really consider switching to rmi-smbus instead of plain PS/2.
Notify them that they should report a missing pnpID in the file.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
 drivers/input/mouse/synaptics.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index fc42259..8d02f4d 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -1741,8 +1741,12 @@ static int synaptics_setup_intertouch(struct psmouse *psmouse,
 
 	if (synaptics_intertouch == SYNAPTICS_INTERTOUCH_NOT_SET) {
 		if (!psmouse_matches_pnp_id(psmouse, topbuttonpad_pnp_ids) &&
-		    !psmouse_matches_pnp_id(psmouse, smbus_pnp_ids))
+		    !psmouse_matches_pnp_id(psmouse, smbus_pnp_ids)) {
+			psmouse_info(psmouse, "Your touchpad (%s) says it can support a different bus.\n"
+				"If i2c-hid and hid-rmi are not used, you might want to try setting psmouse.synaptics_intertouch to 1 and report this to linux-input@vger.kernel.org.\n",
+				psmouse->ps2dev.serio->firmware_id);
 			return -ENXIO;
+		}
 	}
 
 	psmouse_info(psmouse, "Trying to set up SMBus access\n");
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is not compiled in
  2017-05-23  8:36 [PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is not compiled in Benjamin Tissoires
  2017-05-23  8:36 ` [PATCH 2/3] Input: synaptics - warn the users when there is a better mode Benjamin Tissoires
  2017-05-23  8:36 ` [PATCH 3/3] Input: synaptics - tell users to report when they should be using rmi-smbus Benjamin Tissoires
@ 2017-05-23 21:18 ` Dmitry Torokhov
  2 siblings, 0 replies; 7+ messages in thread
From: Dmitry Torokhov @ 2017-05-23 21:18 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: linux-input, linux-kernel

On Tue, May 23, 2017 at 10:36:55AM +0200, Benjamin Tissoires wrote:
> Or the user might have the touchpad unbound from PS/2 but never picked
> up by rmi-smbus.ko
> 
> 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 131df9d..58ff388 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -1687,7 +1687,11 @@ enum {
>  	SYNAPTICS_INTERTOUCH_ON,
>  };
>  
> +#if IS_ENABLED(CONFIG_RMI4_SMB)
>  static int synaptics_intertouch = SYNAPTICS_INTERTOUCH_NOT_SET;
> +#else /* CONFIG_RMI4_SMB */
> +static int synaptics_intertouch = SYNAPTICS_INTERTOUCH_OFF;
> +#endif /* CONFIG_RMI4_SMB */

The benefit of IS_ENABLED is that it can be used in C code:

static int synaptics_intertouch = IS_ENABLED(CONFIG_RMI4_SMB) ?
		SYNAPTICS_INTERTOUCH_NOT_SET : SYNAPTICS_INTERTOUCH_OFF;

>  module_param_named(synaptics_intertouch, synaptics_intertouch, int, 0644);
>  MODULE_PARM_DESC(synaptics_intertouch, "Use a secondary bus for the Synaptics device.");
>  
> -- 
> 2.9.4
> 

Thanks.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] Input: synaptics - warn the users when there is a better mode
  2017-05-23  8:36 ` [PATCH 2/3] Input: synaptics - warn the users when there is a better mode Benjamin Tissoires
@ 2017-05-23 21:20   ` Dmitry Torokhov
  2017-05-30  3:17     ` Dmitry Torokhov
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Torokhov @ 2017-05-23 21:20 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: linux-input, linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] Input: synaptics - warn the users when there is a better mode
  2017-05-23 21:20   ` Dmitry Torokhov
@ 2017-05-30  3:17     ` Dmitry Torokhov
  2017-05-30  8:16       ` Benjamin Tissoires
  0 siblings, 1 reply; 7+ messages in thread
From: Dmitry Torokhov @ 2017-05-30  3:17 UTC (permalink / raw)
  To: Benjamin Tissoires; +Cc: linux-input, linux-kernel

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

-- 
Dmitry

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] Input: synaptics - warn the users when there is a better mode
  2017-05-30  3:17     ` Dmitry Torokhov
@ 2017-05-30  8:16       ` Benjamin Tissoires
  0 siblings, 0 replies; 7+ messages in thread
From: Benjamin Tissoires @ 2017-05-30  8:16 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: linux-input, linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-05-30  8:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-23  8:36 [PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is not compiled in Benjamin Tissoires
2017-05-23  8:36 ` [PATCH 2/3] Input: synaptics - warn the users when there is a better mode Benjamin Tissoires
2017-05-23 21:20   ` Dmitry Torokhov
2017-05-30  3:17     ` Dmitry Torokhov
2017-05-30  8:16       ` Benjamin Tissoires
2017-05-23  8:36 ` [PATCH 3/3] Input: synaptics - tell users to report when they should be using rmi-smbus Benjamin Tissoires
2017-05-23 21:18 ` [PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is not compiled in Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).