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


Groups > linux.kernel > #1590130

Re: [GIT PULL] HID for 4.11

From Benjamin Tissoires <benjamin.tissoires@redhat.com>
Newsgroups linux.kernel
Subject Re: [GIT PULL] HID for 4.11
Date 2017-03-01 10:30 +0100
Message-ID <tg8qK-Tq-9@gated-at.bofh.it> (permalink)
References (4 earlier) <tdap3-5Vf-3@gated-at.bofh.it> <tg0Mx-3uP-5@gated-at.bofh.it> <tg2lj-4F1-19@gated-at.bofh.it> <tg4wO-6c9-7@gated-at.bofh.it> <tg4Gt-6vM-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL] HID for 4.11 Jiri Kosina <jikos@kernel.org> - 2017-02-20 16:30 +0100
  Re: [GIT PULL] HID for 4.11 Linus Torvalds <torvalds@linux-foundation.org> - 2017-02-21 03:50 +0100
    Re: [GIT PULL] HID for 4.11 Linus Torvalds <torvalds@linux-foundation.org> - 2017-02-21 04:10 +0100
      Re: [GIT PULL] HID for 4.11 Linus Torvalds <torvalds@linux-foundation.org> - 2017-02-21 04:20 +0100
      Re: [GIT PULL] HID for 4.11 Linus Torvalds <torvalds@linux-foundation.org> - 2017-02-21 05:20 +0100
        Re: [GIT PULL] HID for 4.11 Linus Torvalds <torvalds@linux-foundation.org> - 2017-02-21 05:40 +0100
          Re: [GIT PULL] HID for 4.11 Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-01 02:00 +0100
            Re: [GIT PULL] HID for 4.11 Andrew Duggan <aduggan@synaptics.com> - 2017-03-01 03:40 +0100
              Re: [GIT PULL] HID for 4.11 Peter Hutterer <peter.hutterer@who-t.net> - 2017-03-01 06:00 +0100
                Re: [GIT PULL] HID for 4.11 Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-01 06:10 +0100
                Re: [GIT PULL] HID for 4.11 Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-03-01 10:10 +0100
                Re: [GIT PULL] HID for 4.11 Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-03-01 19:10 +0100
                Re: [GIT PULL] HID for 4.11 Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-03-01 10:30 +0100
                Re: [GIT PULL] HID for 4.11 Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-03-01 19:00 +0100
                Re: [GIT PULL] HID for 4.11 Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-01 21:10 +0100
                Re: [GIT PULL] HID for 4.11 Linus Torvalds <torvalds@linux-foundation.org> - 2017-03-01 20:00 +0100
        [PATCH] HID: rmi: fallback to generic/multitouch if hid-rmi is not  built (was Re: [GIT PULL] HID for 4.11) Jiri Kosina <jikos@kernel.org> - 2017-02-21 15:20 +0100
          Re: [PATCH] HID: rmi: fallback to generic/multitouch if hid-rmi is  not built (was Re: [GIT PULL] HID for 4.11) Jiri Kosina <jikos@kernel.org> - 2017-02-21 16:50 +0100
            Re: [PATCH] HID: rmi: fallback to generic/multitouch if hid-rmi is  not built (was Re: [GIT PULL] HID for 4.11) Linus Torvalds <torvalds@linux-foundation.org> - 2017-02-21 17:00 +0100
              Re: [PATCH] HID: rmi: fallback to generic/multitouch if hid-rmi is  not built (was Re: [GIT PULL] HID for 4.11) Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-02-21 18:50 +0100
                Re: [PATCH] HID: rmi: fallback to generic/multitouch if hid-rmi is  not built (was Re: [GIT PULL] HID for 4.11) Jiri Kosina <jikos@kernel.org> - 2017-02-21 22:10 +0100
          Re: [PATCH] HID: rmi: fallback to generic/multitouch if hid-rmi is  not built (was Re: [GIT PULL] HID for 4.11) Linus Torvalds <torvalds@linux-foundation.org> - 2017-02-21 16:50 +0100
          Re: [PATCH] HID: rmi: fallback to generic/multitouch if hid-rmi is  not built (was Re: [GIT PULL] HID for 4.11) Benjamin Tissoires <benjamin.tissoires@redhat.com> - 2017-02-21 18:40 +0100
          Re: [PATCH] HID: rmi: fallback to generic/multitouch if hid-rmi is  not built (was Re: [GIT PULL] HID for 4.11) Andrew Duggan <aduggan@synaptics.com> - 2017-02-21 22:20 +0100
    ath10k regression on XPS13 Kalle Valo <kvalo@codeaurora.org> - 2017-02-21 10:40 +0100
      Re: ath10k regression on XPS13 David Miller <davem@davemloft.net> - 2017-02-21 19:20 +0100
        Re: ath10k regression on XPS13 Kalle Valo <kvalo@codeaurora.org> - 2017-02-21 19:40 +0100
          Re: ath10k regression on XPS13 David Miller <davem@davemloft.net> - 2017-02-21 20:00 +0100
            Re: ath10k regression on XPS13 Kalle Valo <kvalo@codeaurora.org> - 2017-02-21 20:50 +0100
              Re: ath10k regression on XPS13 David Miller <davem@davemloft.net> - 2017-02-21 22:10 +0100
        Re: ath10k regression on XPS13 Linus Torvalds <torvalds@linux-foundation.org> - 2017-02-21 20:00 +0100
          Re: ath10k regression on XPS13 David Miller <davem@davemloft.net> - 2017-02-21 22:10 +0100

csiph-web