Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1647793 > unrolled thread

[PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is not compiled in

Started byBenjamin Tissoires <benjamin.tissoires@redhat.com>
First post2017-05-23 10:40 +0200
Last post2017-05-23 23:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is not compiled in Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-05-23 10:40 +0200
    [PATCH 3/3] Input: synaptics - tell users to report when they should be using rmi-smbus Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-05-23 10:40 +0200
    Re: [PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is  not compiled in Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-05-23 23:20 +0200

#1647793 — [PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is not compiled in

FromBenjamin Tissoires <benjamin.tissoires@redhat.com>
Date2017-05-23 10:40 +0200
Subject[PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is not compiled in
Message-ID<tKdwd-Fm-13@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1647799 — [PATCH 3/3] Input: synaptics - tell users to report when they should be using rmi-smbus

FromBenjamin Tissoires <benjamin.tissoires@redhat.com>
Date2017-05-23 10:40 +0200
Subject[PATCH 3/3] Input: synaptics - tell users to report when they should be using rmi-smbus
Message-ID<tKdwe-Fm-31@gated-at.bofh.it>
In reply to#1647793
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

[toc] | [prev] | [next] | [standalone]


#1648725 — Re: [PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is not compiled in

FromDmitry Torokhov <dmitry.torokhov@gmail.com>
Date2017-05-23 23:20 +0200
SubjectRe: [PATCH 1/3] Input: synaptics - keep PS/2 around when RMI4_SMB is not compiled in
Message-ID<tKpnH-w5-5@gated-at.bofh.it>
In reply to#1647793
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web