All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Giulio Benetti <giulio.benetti@benettiengineering.com>
Cc: "Peter Hutterer" <peter.hutterer@who-t.net>,
	"Rob Herring" <robh@kernel.org>,
	"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
	"Henrik Rydberg" <rydberg@bitmath.org>,
	linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 3/3] Input: add driver for the Hycon HY46XX touchpanel series
Date: Wed, 14 Apr 2021 10:26:13 -0700	[thread overview]
Message-ID: <YHcltT7HkJoXrX0f@google.com> (raw)
In-Reply-To: <080a71d9-d629-5589-c943-4e65a7f414d8@benettiengineering.com>

Hi Giulio, Peter,

On Wed, Apr 14, 2021 at 01:22:55PM +0200, Giulio Benetti wrote:
> Hi Peter, Dmitry,
> 
> On 4/14/21 8:46 AM, Peter Hutterer wrote:
> > On Tue, Apr 13, 2021 at 10:44:07PM -0700, Dmitry Torokhov wrote:
> > > Hi Giulio,
> > > 
> > > On Tue, Apr 13, 2021 at 04:44:46PM +0200, Giulio Benetti wrote:
> > > > +
> > > > +	input_mt_report_pointer_emulation(tsdata->input, true);
> > > 
> > > For touchscreens it does not make much sense to report BTN_DOUBLETAP,
> > > BTN_TRIPLETAP, etc, events (they are really for touchpads), so I changed
> > > this to
> > > 
> > > 	input_mt_report_pointer_emulation(tsdata->input, false);
> > > 
> > > to only report ABS_X, ABS_Y, and BTN_TOUCH, and applied.
> > 
> > Can you expand on this please, just to make sure I'm not misinterpreting
> > those codes? Those bits are just for how many fingers are down (but without
> > position), dropping those bits means you restrict the device to a pure
> > single-touch screen. Or am I missing something here?

They are indeed represent number of fingers on the surface. I think I
over-simplified this a bit by saying these events are only for
touchpads, as there is allowance for BTN_TOOL_*TAP in
Documentation/input/multi-touch-protocol.rst for MT devices that may
report more contacts than what they can distinctly track, and it is
not restricted to touchpads (but I believe in reality only used by a
couple of "semi-MT" touchpad drivers).

What I meant to say that for ST fallback of MT-capable devices we
typically provide BTN_TOOL_*TAP for devices declared as INPUT_MT_POINTER
(which is touchpads) and for INPUT_MT_DIRECT and others we only provide
ABS_X, ABS_Y, ABS_PRESSURE and BTN_TOUCH (see input_mt_sync_frame()),
and I think this driver should follow the suit.

> 
> I've re-tested the driver after setting input_mt_report_pointer_emulation()
> use_count to false. It works correctly with all touch points expected. That
> use_count refers to finger count of Touchpad[1]. Also you can see that even
> with use_count=false this for loop[2] is entered by counting all the
> mt->slots and then input_event() reports all of them.

That is not quite true. The loop in question locates the oldest contact
still on the surface and MT->ST mapping uses it as the "primary" point
for ST events. It is reported in addition to sending all contacts via MT
protocol as ABS_MT_SLOT, ABS_MT_POSITION_X, ABS_MT_POSITION_Y, ...

> 
> I hope I've understood correctly :-)
> 
> [1]: https://elixir.bootlin.com/linux/v5.12-rc7/source/drivers/input/input-mt.c#L190
> [2]: https://elixir.bootlin.com/linux/v5.12-rc7/source/drivers/input/input-mt.c#L208
> 
> > then again, MT support has been in the kernel for long enough that by now
> > everything should understand it, so there's a certain "meh" factor.

Yeah, there is that too.

Thanks.

-- 
Dmitry

  reply	other threads:[~2021-04-14 17:26 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210305163834.70924-1-giulio.benetti@benettiengineering.com>
2021-03-05 16:38 ` [PATCH 1/3] dt-bindings: Add Hycon Technology vendor prefix Giulio Benetti
2021-03-05 17:25   ` Jonathan Neuschäfer
2021-03-05 17:33     ` Giulio Benetti
2021-03-05 19:32       ` Giulio Benetti
2021-03-05 16:38 ` [PATCH 2/3] dt-bindings: touchscreen: Add HY46XX bindings Giulio Benetti
2021-03-05 19:34   ` Giulio Benetti
2021-03-06 19:28   ` Rob Herring
2021-03-06 19:41   ` Rob Herring
2021-04-01 18:37     ` Giulio Benetti
2021-04-01 22:24       ` Giulio Benetti
2021-04-01 23:03     ` [PATCH v2 0/3] Input: add Hycon HY46XX Touchscreen controller Giulio Benetti
2021-04-01 23:03       ` [PATCH v2 1/3] dt-bindings: Add Hycon Technology vendor prefix Giulio Benetti
2021-04-01 23:03       ` [PATCH v2 2/3] dt-bindings: touchscreen: Add HY46XX bindings Giulio Benetti
2021-04-02  8:36         ` Jonathan Neuschäfer
2021-04-02 15:17           ` Giulio Benetti
2021-04-01 23:03       ` [PATCH v2 3/3] Input: add driver for the Hycon HY46XX touchpanel series Giulio Benetti
2021-04-02  8:59         ` Jonathan Neuschäfer
2021-04-02 15:23           ` Giulio Benetti
2021-04-02 16:16           ` [PATCH v3 0/3] Input: add Hycon HY46XX Touchscreen controller Giulio Benetti
2021-04-02 16:16             ` [PATCH v3 1/3] dt-bindings: Add Hycon Technology vendor prefix Giulio Benetti
2021-04-02 16:16             ` [PATCH v3 2/3] dt-bindings: touchscreen: Add HY46XX bindings Giulio Benetti
2021-04-06 13:24               ` Rob Herring
2021-04-07 17:57                 ` Giulio Benetti
2021-04-07 18:56                   ` Rob Herring
2021-04-07 19:17                     ` Giulio Benetti
2021-04-06 13:37               ` Jonathan Neuschäfer
2021-04-06 14:07                 ` Giulio Benetti
2021-04-07 17:49                 ` [PATCH v4 0/3] Input: add Hycon HY46XX Touchscreen controller Giulio Benetti
2021-04-07 17:49                   ` [PATCH v4 1/3] dt-bindings: Add Hycon Technology vendor prefix Giulio Benetti
2021-04-08 20:16                     ` Rob Herring
2021-04-07 17:49                   ` [PATCH v4 2/3] dt-bindings: touchscreen: Add HY46XX bindings Giulio Benetti
2021-04-08 20:21                     ` Rob Herring
2021-04-11 11:37                       ` Giulio Benetti
2021-04-11 11:48                       ` [PATCH v5 0/3] Input: add Hycon HY46XX Touchscreen controller Giulio Benetti
2021-04-11 11:48                         ` [PATCH v5 1/3] dt-bindings: Add Hycon Technology vendor prefix Giulio Benetti
2021-04-12 15:05                           ` Rob Herring
2021-04-12 15:12                             ` Giulio Benetti
2021-04-13 13:35                               ` Rob Herring
2021-04-13 14:44                                 ` [PATCH v7 0/3] Input: add Hycon HY46XX Touchscreen controller Giulio Benetti
2021-04-13 14:44                                   ` [PATCH v7 1/3] dt-bindings: Add Hycon Technology vendor prefix Giulio Benetti
2021-04-14  5:44                                     ` Dmitry Torokhov
2021-04-13 14:44                                   ` [PATCH v7 2/3] dt-bindings: touchscreen: Add HY46XX bindings Giulio Benetti
2021-04-13 16:36                                     ` Rob Herring
2021-04-14  5:44                                     ` Dmitry Torokhov
2021-04-13 14:44                                   ` [PATCH v7 3/3] Input: add driver for the Hycon HY46XX touchpanel series Giulio Benetti
2021-04-14  5:44                                     ` Dmitry Torokhov
2021-04-14  6:46                                       ` Peter Hutterer
2021-04-14 11:22                                         ` Giulio Benetti
2021-04-14 17:26                                           ` Dmitry Torokhov [this message]
2021-04-15  6:16                                             ` Peter Hutterer
2021-04-14 11:24                                       ` Giulio Benetti
2021-04-11 11:48                         ` [PATCH v5 2/3] dt-bindings: touchscreen: Add HY46XX bindings Giulio Benetti
2021-04-12 13:20                           ` Rob Herring
2021-04-12 14:46                           ` Rob Herring
2021-04-12 14:49                             ` Giulio Benetti
2021-04-12 15:23                             ` [PATCH v6 0/2] Input: add Hycon HY46XX Touchscreen controller Giulio Benetti
2021-04-12 15:23                               ` [PATCH v6 1/2] dt-bindings: touchscreen: Add HY46XX bindings Giulio Benetti
2021-04-13 15:07                                 ` Rob Herring
2021-04-13 15:27                                   ` Giulio Benetti
2021-04-13 17:58                                     ` Rob Herring
2021-04-13 18:34                                       ` Giulio Benetti
2021-04-12 15:24                               ` [PATCH v6 2/2] Input: add driver for the Hycon HY46XX touchpanel series Giulio Benetti
2021-04-11 11:48                         ` [PATCH v5 3/3] " Giulio Benetti
2021-04-07 17:49                   ` [PATCH v4 " Giulio Benetti
2021-04-02 16:16             ` [PATCH v3 " Giulio Benetti
2021-03-05 16:38 ` [PATCH " Giulio Benetti
2021-03-05 19:00   ` Dmitry Torokhov
2021-03-05 19:31     ` Giulio Benetti
2021-03-05 19:54     ` Giulio Benetti

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=YHcltT7HkJoXrX0f@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=j.neuschaefer@gmx.net \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.hutterer@who-t.net \
    --cc=robh@kernel.org \
    --cc=rydberg@bitmath.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.