[systemd-devel] [PATCH] hwdb: add rule and first entry for PS/2 mice
Peter Hutterer
peter.hutterer at who-t.net
Tue Dec 23 14:09:31 PST 2014
On Tue, Dec 23, 2014 at 02:16:15PM +0100, David Herrmann wrote:
> (CC'ing sd-devel this time.. sorry)
>
> On Tue, Dec 23, 2014 at 1:19 AM, Peter Hutterer
> <peter.hutterer at who-t.net> wrote:
> > https://bugs.freedesktop.org/show_bug.cgi?id=87037
> > ---
> > some feedback on the rule would be appreciated, in case there's a better
> > approach to matching.
> >
> > hwdb/70-mouse.hwdb | 4 ++++
> > rules/70-mouse.rules | 3 +++
> > 2 files changed, 7 insertions(+)
> >
> > diff --git a/hwdb/70-mouse.hwdb b/hwdb/70-mouse.hwdb
> > index d40e864..76bcf9b 100644
> > --- a/hwdb/70-mouse.hwdb
> > +++ b/hwdb/70-mouse.hwdb
> > @@ -188,6 +188,10 @@ mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4026:
> > mouse:bluetooth:v046dpb00d:name:Ultrathin Touch Mouse:
> > MOUSE_DPI=1000 at 1000
> >
> > +# ImExPS/2 Logitech Wheel Mouse
> > +mouse:ps2:*:name:ImExPS/2 Logitech Wheel Mouse:
> > + MOUSE_DPI=400 at 250
> > +
> > ##########################################
> > # Microsoft
> > ##########################################
> > diff --git a/rules/70-mouse.rules b/rules/70-mouse.rules
> > index 0e359e8..4e2eb8a 100644
> > --- a/rules/70-mouse.rules
> > +++ b/rules/70-mouse.rules
> > @@ -11,5 +11,8 @@ KERNELS=="input*", ENV{ID_BUS}=="usb", \
> > KERNELS=="input*", ENV{ID_BUS}=="bluetooth", \
> > IMPORT{builtin}="hwdb 'mouse:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \
> > GOTO="mouse_end"
> > +DRIVERS=="psmouse", \
> > + IMPORT{builtin}="hwdb 'mouse:ps2::name:$attr{device/name}:'", \
> > + GOTO="mouse_end"
>
> So 'psmouse' uses:
> "%s %s %s", protocol, vendor, name
>
> Kinda disappointing that we cannot query each value individually.. but
> it's 80's technology, so I guess no-one cares that much, anyway.
>
> I'm fine with matching on the driver, but I'd prefer adding a
> SUBSYSTEMS=="serio" (or even "SUBSYSTEM"? not sure, don't have a ps2
> device here).
added SUBSYSTEMS. fwiw, SUBSYSTEM on the actual device is 'input', bug 87037
has the udevadm output but I found the trackstick on the lenovos looks
almost identical for testing.
> So please, go ahead and push it.
done, thanks.
Cheers,
Peter
More information about the systemd-devel
mailing list