[PATCH evdev] Export device node as property.
Peter Korsgaard
jacmet at sunsite.dk
Wed Feb 2 00:45:13 PST 2011
>>>>> "Peter" == Peter Hutterer <peter.hutterer at who-t.net> writes:
Hi Peter,
Thanks for picking this up again, I unfortunately have been busy with
other things ..
Peter> There is currently no mapping between XI devices and physical
Peter> devices other than what can be extracted by parsing the Xorg
Peter> logfile. Add new property "Device Node" to the driver to export
Peter> the open device file.
Peter> The client is responsible for detecting if the device is on the
Peter> same host and converting the data into a more useful format
Peter> (e.g. sysfs path).
Peter> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
Peter> ---
Peter> Got poked again for this at LCA. turns out what I asked Peter to
Peter> do ages ago isn't actually feasable. I wanted this to be in the
Peter> server so the drivers can share this property without
Peter> re-implementation everywhere. Now, this doesn't work as the
Peter> server can read the 'Option "Device"' value but there's no
Peter> guarantee that the content of that is actually the device patch.
Peter> e.g. synaptics may use "auto-dev".
Peter> So here's a re-implementation that simply sets the property to
Peter> the device path the driver opened. Everything else is up to the
Peter> client, it's quite simple to get the sysfs path from the device
Peter> node (about 5 lines with libudev).
I obviously like the concept, but this assumption basically breaks
remote X. What I think we really need is a unique identifier for XI
devices (to be able to reapply properties at next login), and with
hotplugging, the device node isn't really a good choice.
For evdev I still think our best bet for a unique identifier is
EVIOCGPHYS, like I did back then:
http://peter.korsgaard.com/patches/xorg/evdev-add-phys-property-EVIOCGPHYS-as-stable-identifer-v2.patch
E.G. use something like usb-0000:00:1d.1-1/input0 rather than
/dev/input/event14.
--
Bye, Peter Korsgaard
More information about the xorg-devel
mailing list