linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Make the hid-logitech-dj driver remove the HID++ nodes when the device disconnects
@ 2020-02-06 11:14 Filipe Laíns
  2020-02-06 11:30 ` Hans de Goede
  0 siblings, 1 reply; 17+ messages in thread
From: Filipe Laíns @ 2020-02-06 11:14 UTC (permalink / raw)
  To: linux-input
  Cc: Benjamin Tissoires, Peter Hutterer, Nestor Lopez Casado,
	Jiri Kosina, Hans de Goede, Bastien Nocera, Julien Hartmann

[-- Attachment #1: Type: text/plain, Size: 1554 bytes --]

Hello,

Right now the hid-logitech-dj driver will export one node for each
connected device, even when the device is not connected. That causes
some trouble because in userspace we don't have have any way to know if
the device is connected or not, so when we try to communicate, if the
device is disconnected it will fail.

The reason we do this is because otherwise we would loose the first
packets when the device is turned on by key press. When a device is
turned on we would have to create the device node, and the packets
received while we are creating the device node would be lost. This
could solved by buffering those packets, but that is a bad solution as
it would mess up the timings.

At the moment the created node includes both normal HID and vendor
usages. To solve this problem, I propose that instead of creating a
single device node that contains all usages, we create one for normal
HID, which would exist all the time, and one for the vendor usage,
which would go away when the device disconnects.

This slight behavior change will affect userspace. Two hidraw nodes
would be created instead of one. We need to make sure the current
userspace stacks interfacing with this would be able to properly handle
such changes.

What do you think of this approach? Anyone has a better idea?

If you are CCed you might be maintaining one of the affected userspace
stacks, if so, please let me know your project is able to handle this.
If not, I can help you adapt to the new behavior.

Thank you,
Filipe Laíns

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2020-02-13 16:11 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 11:14 Make the hid-logitech-dj driver remove the HID++ nodes when the device disconnects Filipe Laíns
2020-02-06 11:30 ` Hans de Goede
2020-02-06 11:51   ` Filipe Laíns
2020-02-06 12:13     ` Hans de Goede
2020-02-06 15:42       ` Filipe Laíns
2020-02-06 17:01         ` Benjamin Tissoires
2020-02-06 17:45           ` Hans de Goede
2020-02-06 18:43             ` Filipe Laíns
2020-02-06 19:02               ` Hans de Goede
2020-02-06 19:43                 ` Filipe Laíns
2020-02-13 15:07                 ` Benjamin Tissoires
2020-02-13 15:52                   ` Hans de Goede
2020-02-07  0:03           ` Peter Hutterer
2020-02-07  0:36             ` Filipe Laíns
2020-02-13 15:12               ` Benjamin Tissoires
2020-02-13 15:24                 ` Filipe Laíns
2020-02-13 16:10                   ` Benjamin Tissoires

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).