[systemd-devel] [RFC PATCH] udev: add an "abs-override" builtin to override EV_ABS data

David Herrmann dh.herrmann at gmail.com
Thu Mar 19 05:54:46 PDT 2015


On Thu, Mar 19, 2015 at 10:52 AM, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> This builtin parses properties in the form
> EV_ABS_OVERRIDE_00="<min>:<max>:<res>:<fuzz>:<flat>"

The concept sounds good. hwdb is definitely the place to put this,
rather than static kernel fixups.

> and applies them to the kernel device. Future processes that open that device
> will see the updated EV_ABS range.
> This is particularly useful for touchpads that don't provide a resolution in
> the kernel driver but can be fixed up through hwdb entries (e.g. bcm5974).
> All values in the property are optional, e.g. a string of "::45" is valid to
> set the resolution to 45.
> The order intentionally orders resolution before fuzz and flat despite it
> being the last element in the absinfo struct. The use-case for setting
> fuzz/flat is almost non-existent, resolution is probably the most common case
> we'll need.

If a field is left empty, should it take the kernel-provided values?
This way, you could just order it logically and leave stuff you don't
wanna change empty.

> ---
> This is just an RFC for now, a couple of questions remain:
> * we need this for touchpads, but this seems something that could be more
>   generic and have it's own ruleset, possibly depending on ID_INPUT_TOUCH*
>   or so
> * input_id is already called and opens the device, we could merge this in
>   there

Don't get confused by the name of this builtin. It's legacy. We should
probably also merge 'keyboard' into it.

Talking about the 'keyboard' builtin: why not merge both? They serve
the same purpose, fixing wrong kernel mapping/data. You could even
rename the prefix to "evdev" ('input' is reserved..), and then put
both into the same file. You could re-use the matching we have in
place for keyboards. I think it would work well enough for all other
input-devices, too. It uses the input-modalias, and device-name+dmi as
fallback. Ok, the "atkbd:" is special to keyboards, but just ignore


More information about the systemd-devel mailing list