From: Vicki Pfau <vi@endrift.com>
To: Roderick Colenbrander <thunderbird2k@gmail.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
"open list:HID CORE LAYER" <linux-input@vger.kernel.org>,
Roderick Colenbrander <roderick.colenbrander@sony.com>,
Jiri Kosina <jikos@kernel.org>
Subject: Re: [PATCH 1/6] HID: hid-playstation: Allow removal of touchpad
Date: Thu, 5 May 2022 23:46:40 -0700 [thread overview]
Message-ID: <b94a747c-8974-b574-e751-6a6b2e01a29c@endrift.com> (raw)
In-Reply-To: <CAEc3jaB5aRtuWBV8wuqFy+Tic360LLbV6M09KY+aeWR7XLjZxw@mail.gmail.com>
Hello,
On 5/5/22 22:21, Roderick Colenbrander wrote:
> Hi Vicki,
>
> Joining the conversation late as I on a long vacation.
>
> On Thu, May 5, 2022 at 12:47 PM Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
>>
>> On Thu, May 05, 2022 at 10:50:24AM +0200, Benjamin Tissoires wrote:
>>> Hi Vicki,
>>>
>>> On Thu, Apr 28, 2022 at 12:52 AM Vicki Pfau <vi@endrift.com> wrote:
>>>>
>>>> This allows the touchpad input_dev to be removed and have the driver remain
>>>> functional without its presence. This will be used to allow the touchpad to
>>>> be disabled, e.g. by a module parameter.
>>>
>>> Thanks for the contribution.
>>> I'd like to hear from Roderick, but I have a general comment here:
>>> We had Wii and Steam controllers following this logic. Now we are
>>> adding Sony PS ones... That seems like a lot of duplication, and I
>>> wonder if we should not have something more generic.
>>
>
> I understand the use case of rejecting input. I wasn't that fond of
> handling it kernel side also because it would complicate the code a
> lot more (and some would perhaps want to do the same for accelerometer
> device). Below Dmitry gives a nice idea about inhibition.
>
> Methods I would considered perhaps would have been a custom udev role
> (it sounds like you have control of the platform). Or another method
> is using EVIOCGRAB to get exclusive access to an input device to block
> others from using it again depends on your specific use case. When
> this topic came up some years ago with Valve it was one of the methods
> considered there if I recall.
>
>> Hmm, if userspace is not interested in data from an input device (and it
>> does not want to simply not open it), it can use inhibit/uninhibit sysfs
>> attributes to silence it.
>>
>> I am not sure we need to build support for destroying input device or
>> introducing module parameters, etc.
>>
>
> Inhibition is interesting and could work. I wasn't aware of this
> feature and we may actually use it for hid-playstation to save some
> power as there are various HID commands for power saving when the
> device isn't open. If we were to add that, some care would need to be
> taken with HIDRAW, which the driver is often unaware of. I guess the
> end responsibility for making sure the device would work would be with
> the hidraw user (unless there will be some interop APIs).
>
I would like to know more about these sysfs controls. I wasn't aware of any way to do this from userspace, and paired with udev rules that allow access to these controls (can udev modify sysfs permissions?) to the right users/groups, this might be a viable way to manage this. My sponsor is Valve, so that might be why this is somewhat familiar. They want to be able to have the Steam input daemon disable various reporting from the controllers without requiring root or getting too deep into the system, but I think udev rules that allow Steam itself access to the sysfs inhibition controls may be a good approach if there's a way to do that, especially already in the kernel. I know the kernel they're shipping right now is a few versions old.
Thanks,
Vicki
>> Thanks.
>>
>> --
>> Dmitry
>
>
> Thanks,
> Roderick
next prev parent reply other threads:[~2022-05-06 6:46 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
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 [this message]
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=b94a747c-8974-b574-e751-6a6b2e01a29c@endrift.com \
--to=vi@endrift.com \
--cc=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=thunderbird2k@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).