All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Hutterer <peter.hutterer@who-t.net>,
	Andrew Duggan <aduggan@synaptics.com>,
	Jiri Kosina <jikos@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] HID for 4.11
Date: Wed, 1 Mar 2017 10:03:47 +0100	[thread overview]
Message-ID: <20170301090347.GE7064@mail.corp.redhat.com> (raw)
In-Reply-To: <CA+55aFxeX5SW7kki=wqAhDfxtzuDG0xach7f5eOgJCD8drLuFA@mail.gmail.com>

On Feb 28 2017 or thereabouts, Linus Torvalds wrote:
> On Tue, Feb 28, 2017 at 7:24 PM, Peter Hutterer
> <peter.hutterer@who-t.net> wrote:
> >
> > I suspect you're just triggering a bug that wasn't triggered by the ps/2
> > emulation. you can run linput-debug-events --verbose and have a look at the
> > various state debugging information, that may hint at what's going on (e.g.
> > a finger mistaken as palm touch, or something). Or record one such
> > interaction with evemu-record and send it to me (preferrably here [1], if
> > you're using libinput). Also, what version of libinput/synaptics are you on?
> 
> bug reported (it's bug 100014).
> 

Thanks for the report.

As Peter mentioned in the bug, there is a missing property on the kernel
node (INPUT_PROP_BUTTONPAD). 

The thing is this property is solely driven in the current driver by the
provided platform_data, so there is no way we ever set it through
hid-rmi. I wonder how we missed that.

Anyway, the good news is that the evemu record shows only one exportted
button, so we can infer the property quite easily in the module. Would
something like that work for you?

>From 5f28af88f2c67d1c533500765c5190cdd3006539 Mon Sep 17 00:00:00 2001
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date: Wed, 1 Mar 2017 09:57:00 +0100
Subject: [PATCH] Input: rmi4 - f30: detect INPUT_PROP_BUTTONPAD from the
 button count

INPUT_PROP_BUTTONPAD is currently only set through the platform data.
The RMI4 header doc says that this property is there to force the
buttonpad property, so we also need to detect it by looking at
the exported buttons count.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
---
 drivers/input/rmi4/rmi_f30.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/input/rmi4/rmi_f30.c b/drivers/input/rmi4/rmi_f30.c
index 3422464..1986786 100644
--- a/drivers/input/rmi4/rmi_f30.c
+++ b/drivers/input/rmi4/rmi_f30.c
@@ -258,9 +258,10 @@ static int rmi_f30_map_gpios(struct rmi_function *fn,
 
 	/*
 	 * Buttonpad could be also inferred from f30->has_mech_mouse_btns,
-	 * but I am not sure, so use only the pdata info.
+	 * but I am not sure, so use only the pdata info and the number of
+	 * mapped buttons.
 	 */
-	if (pdata->f30_data.buttonpad)
+	if (pdata->f30_data.buttonpad || (button - BTN_LEFT == 1))
 		__set_bit(INPUT_PROP_BUTTONPAD, input->propbit);
 
 	return 0;
-- 
2.9.3

Dmitry, Andrew, would this work for you too?

Cheers,
Benjamin

  parent reply	other threads:[~2017-03-01  9:28 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-20 15:20 [GIT PULL] HID for 4.11 Jiri Kosina
2017-02-21  2:48 ` Linus Torvalds
2017-02-21  3:03   ` Linus Torvalds
2017-02-21  3:19     ` Linus Torvalds
2017-02-21  4:13     ` Linus Torvalds
2017-02-21  4:37       ` Linus Torvalds
2017-03-01  0:56         ` Linus Torvalds
2017-03-01  2:31           ` Andrew Duggan
2017-03-01  3:24             ` Peter Hutterer
2017-03-01  5:05               ` Linus Torvalds
2017-03-01  7:43                 ` Andrew Duggan
2017-03-01  9:03                 ` Benjamin Tissoires [this message]
2017-03-01  9:06                   ` Benjamin Tissoires
2017-03-01 17:31                     ` Dmitry Torokhov
2017-03-01 17:54                   ` Linus Torvalds
2017-03-01 17:58                     ` Dmitry Torokhov
2017-03-01 18:02                       ` Linus Torvalds
2017-02-21 14:17       ` [PATCH] HID: rmi: fallback to generic/multitouch if hid-rmi is not built (was Re: [GIT PULL] HID for 4.11) Jiri Kosina
2017-02-21 15:43         ` Linus Torvalds
2017-02-21 15:46           ` Jiri Kosina
2017-02-21 15:49             ` Linus Torvalds
2017-02-21 17:42               ` Benjamin Tissoires
2017-02-21 21:03                 ` Jiri Kosina
2017-02-22  0:53                   ` Jason Gerecke
2017-02-21 17:37         ` Benjamin Tissoires
2017-02-21 21:16         ` Andrew Duggan
2017-02-21 21:16           ` Andrew Duggan
2017-02-21  9:32   ` ath10k regression on XPS13 Kalle Valo
2017-02-21  9:32     ` Kalle Valo
2017-02-21 18:18     ` David Miller
2017-02-21 18:18       ` David Miller
2017-02-21 18:38       ` Kalle Valo
2017-02-21 18:38         ` Kalle Valo
2017-02-21 18:53         ` David Miller
2017-02-21 18:53           ` David Miller
2017-02-21 19:49           ` Kalle Valo
2017-02-21 19:49             ` Kalle Valo
2017-02-21 21:00             ` David Miller
2017-02-21 21:00               ` David Miller
2017-02-21 18:52       ` Linus Torvalds
2017-02-21 18:52         ` Linus Torvalds
2017-02-21 21:01         ` David Miller
2017-02-21 21:01           ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170301090347.GE7064@mail.corp.redhat.com \
    --to=benjamin.tissoires@redhat.com \
    --cc=aduggan@synaptics.com \
    --cc=jikos@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.hutterer@who-t.net \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.