[PATCHv2] evdev: add phys property (EVIOCGPHYS) as stable identifier

Peter Korsgaard jacmet at sunsite.dk
Wed May 5 00:04:46 PDT 2010


>>>>> "Peter" == Peter Hutterer <peter.hutterer at who-t.net> writes:

Hi,

 >> Changes since V1:
 >> Incorporated feedback from Peter:
 >> - Renamed property to "Evdev Physical Path"
 >> - Document in man page
 >> 

 Peter> uhm, what happend to the idea of implementing this in the server
 Peter> and only adding to it in the driver? Don't get me wrong, I
 Peter> appreciate that you fixed up the patch but I thought we had
 Peter> agreed on the other approach? Did I misunderstand this?

The "Evdev Physical Path" property is evdev specific (EVIOCGPHYS), but
I'm adding a generic "Device Node" property containing the path to the
device node to the server now - My understanding was that this was what
you wanted?

I'm testing it right now and will send a patch later tonight.

The two things are not quite equivalent. The EVIOCGPHYS is nice as an
unique identifier for reloading configuration data for a given input
device (E.G. the touchscreen transformation stuff I'm working on). The
device node is mainly useful for debugging imho.

You CAN get from the device node to the EVIOCGPHYS (but not exact the
other way), but it's kind of cumbersome:

stat device node, verify major:minor in 13:64..95 range
subtract 64 from minor number, search for H Handlers=.*event$minor in
/proc/bus/input/devices
Parse corresponding P: Phys= line

So I would prefer to keep the phys property, what do you say?

-- 
Bye, Peter Korsgaard


More information about the xorg-devel mailing list