Re: Adding input_id to udev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 30, 2009 at 1:57 AM, Martin Pitt <martin.pitt@xxxxxxxxxx> wrote:
> Hello,
>
> in the course of udevifying X.org, we determined that we need a
> reliable way of detecting whether an input device is a touchpad (and
> thus should be driven by -synaptics instead of -evdev). Our first
> attempt [1] uses ATTRS{protocol}=="AlpsPS/2", but that misses a lot of
> devices using other protocols.
>
> So at least for now it would be better to actually check the
> inputN/capabilities/{key,abs} flags in sysfs, like hal used to do.
>
> I took the hal code as a basis and created an input_id program [2]
> which detects the class of a device (since bit testing in udev rules
> isn't possible). We can then use this in X.org's and potentially other
> rules.

Awesome. I was hoping someone would pick this up.

> Questions:
>
>  * Should we maintain this in udev proper, in extras/input_id/ ? (My
>   preferred solution, since it's not really X.org specific). I'm up
>   for maintaining it.
>
>  * Should udev itself install rules which call this, or should we just
>   provide it for other packages to use? Calling it in udev itself
>   feels a little more robust to me, but it would mean that the
>   probing would be done in vain on systems which use X.org with hal.
>
>   Something like
>
>   ACTION=="add|change", SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{program}="input_id /sys/%p"

I think yes to both questions. It's pretty generic info, and I'm
pretty sure xorg wasn't the only one that wanted to consume it from
the hal database. I would also expect that any systems that have udev
(all linux) will be using it for the xorg config backend once it's
available. There was a lot of pushback from the extra "bloat" the hal
dependency added.

--
Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux