All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Vicki Pfau <vi@endrift.com>
Cc: "open list:HID CORE LAYER" <linux-input@vger.kernel.org>,
	Roderick Colenbrander <roderick.colenbrander@sony.com>,
	Jiri Kosina <jikos@kernel.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Subject: Re: [PATCH 3/6] HID: hid-playstation: Disable touchpad reporting when hidraw open
Date: Fri, 6 May 2022 08:57:00 +0200	[thread overview]
Message-ID: <CAO-hwJ+EP8+wRFVJSrh__t=Jk63SOQLQarbM3ZDHzw4K2_S-JA@mail.gmail.com> (raw)
In-Reply-To: <0f886b39-8aed-436e-7963-c908409101dd@endrift.com>

On Fri, May 6, 2022 at 12:04 AM Vicki Pfau <vi@endrift.com> wrote:
>
> Hello,
>
> On 5/5/22 01:57, Benjamin Tissoires wrote:
> > On Thu, Apr 28, 2022 at 12:52 AM Vicki Pfau <vi@endrift.com> wrote:
> >>
> >> When using the hidraw node directly, disable the touchpad endpoint to prevent
> >> it from sending separate mouse-like reports. This is accomplished in the same
> >> way that the hid-steam driver does it, by creating and attaching an input_dev
> >> with a custom low-level transport driver, which monitors and reports when the
> >> hidraw node is opened or closed. Reports sent by the real device are reported
> >> to the "fake" device, and the real device is prevented from creating a hidraw
> >> node. This "fake" device is connected with only a hidraw node, and is exposed
> >> with identifying information that is identical to the original device, so the
> >> "fake" device's hidraw node appears as the node associated with the dev.
> >
> > Besides the "we should have a generic way of doing this", why do we
> > only prevent touchpad events from being reported?
>
> As, from what I can tell, most windowing systems treat it as a mouse, it's the most prone to "double input" problems when prodded by both the hidraw and the windowing system. Windowing systems generally don't do anything with the other exposed inputs, as far as I can tell.
>
> >
> > [looking at the code further down]
> >
> > So it seems you are entirely disabling the input nodes, which is what
> > I would have expected, so the commit description needs some changes.
> > Or am I reading this wrong?
>
> I am unsure where this discrepancy lies in the description. Can you be more specific?
>

When I read the code, I was under the impression that when an hidraw
node was opened, it was disabling all other input nodes (joysticks,
buttons and touchpad).
But maybe this is just disabling the touchpad, which still leaves you
with duplicated events on the gamepad side.
So either we need to also disable those other events, or the code is
doing just that and the description is not correct :)

Cheersm
Benjamin


  parent reply	other threads:[~2022-05-06  6:57 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-27 22:45 [PATCH 1/6] HID: hid-playstation: Allow removal of touchpad Vicki Pfau
2022-04-27 22:45 ` [PATCH 2/6] HID: hid-playstation: Add touchpad_mouse param Vicki Pfau
2022-05-05  8:52   ` Benjamin Tissoires
2022-05-05 22:00     ` Vicki Pfau
2022-04-27 22:45 ` [PATCH 3/6] HID: hid-playstation: Disable touchpad reporting when hidraw open Vicki Pfau
2022-05-05  8:57   ` Benjamin Tissoires
2022-05-05 22:03     ` Vicki Pfau
2022-05-06  6:00       ` Roderick Colenbrander
2022-05-06  6:54         ` Benjamin Tissoires
2022-05-06  6:57       ` Benjamin Tissoires [this message]
2022-04-27 22:45 ` [PATCH 4/6] HID: hid-sony: Allow removal of touchpad Vicki Pfau
2022-04-27 22:45 ` [PATCH 5/6] HID: hid-sony: Add touchpad_mouse param Vicki Pfau
2022-04-27 22:45 ` [PATCH 6/6] HID: hid-sony: Disable touchpad reporting when hidraw open Vicki Pfau
2022-05-05  8:50 ` [PATCH 1/6] HID: hid-playstation: Allow removal of touchpad Benjamin Tissoires
2022-05-05 16:55   ` Dmitry Torokhov
2022-05-06  5:21     ` Roderick Colenbrander
2022-05-06  6:46       ` Vicki Pfau
2022-05-06  6:59     ` Roderick Colenbrander
2022-05-06  8:23       ` Benjamin Tissoires
2022-05-05 21:57   ` Vicki Pfau

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='CAO-hwJ+EP8+wRFVJSrh__t=Jk63SOQLQarbM3ZDHzw4K2_S-JA@mail.gmail.com' \
    --to=benjamin.tissoires@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=roderick.colenbrander@sony.com \
    --cc=vi@endrift.com \
    /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.