Le mardi 25 avril 2017 à 10:53 +1000, Peter Hutterer a écrit : > On Mon, Apr 24, 2017 at 03:31:39PM +0200, Paul Kocialkowski wrote: > > Le lundi 24 avril 2017 à 16:11 +1000, Peter Hutterer a écrit : > > > On Fri, Apr 21, 2017 at 01:31:56PM +0200, Paul Kocialkowski wrote: > > > > Some devices do not use dmi at all (this is the case on most non-x86 > > > > platforms, such as arm and arm64) but should able to select specific > > > > quirks based on the input device name too. > > > > > > > > This adds name-based input device detection without dmi to support > > > > these devices. > > > > > > > > Signed-off-by: Paul Kocialkowski <[email protected]> > > > > --- > > > > udev/90-libinput-model-quirks.rules.in | 4 ++++ > > > > 1 file changed, 4 insertions(+) > > > > > > > > diff --git a/udev/90-libinput-model-quirks.rules.in b/udev/90-libinput- > > > > model-quirks.rules.in > > > > index 8bff192..149ef0d 100644 > > > > --- a/udev/90-libinput-model-quirks.rules.in > > > > +++ b/udev/90-libinput-model-quirks.rules.in > > > > @@ -37,4 +37,8 @@ ENV{ID_INPUT_MOUSE}=="1", \ > > > > KERNELS=="input*", \ > > > > IMPORT{builtin}="hwdb > > > > 'libinput:name:$attr{name}:$attr{[dmi/id]modalias}'" > > > > > > > > +# libinput:name:<name> > > > > +KERNELS=="input*", \ > > > > + IMPORT{builtin}="hwdb 'libinput:name:$attr{name}'" > > > > > > is there something else we can hook onto? the i2c bus maybe? I'm a bit > > > worried for these generic ones to start leaking into other devices. > > > > I don't think the i2c bus would make any relevant difference here. > > > > On the other hand, the device-tree model string (/proc/device-tree/model) > > should > > properly (and uniquely) identify end devices. However, I don't think there's > > a > > way to bind this to the attr udev event format, although it would be > > relevant to > > have rules depending on the device-tree format (not only for libinput). > > > > Also, note that the name+dmi rules will have priority over the name-only one > > that I'm introducing. So the problem will likely only be between non-dmi > > devices > > that have the same driver name but need separate quirks. There are also > > already > > many rules where the dmi string is ignored (which is equivalent to what I'm > > introducing), only that this doesn't work on ARM because the dmi nodes are > > missing. > > > > To solve this, I think the only relevant course of action would be to add > > device-tree model support in systemd/udev and then use that in libinput. > > > > What do you think, should I prepare and submit such changes? > > yeah, having this available would help a lot here, even if it ends up just > separating the device tree bits from the normal bits. I'm not overly happy > with the hwdb matching as it is, it behaves a bit unexpected at times and I > wouldn't be suprised if your current hwdb has some bugs where things don't > get applied correctly. One more reason to not over-expand the match rules.
Turns out, the device-tree nodes are available from sysfs under: /sys/firmware/devicetree/base so I should be able to get model-based detection without adding specific bits in systemd. Will submit v2 with that when ready. Cheers! -- Paul Kocialkowski, developer of free digital technology and hardware support Website: https://www.paulk.fr/ Coding blog: https://code.paulk.fr/ Git repositories: https://git.paulk.fr/ https://git.code.paulk.fr/
signature.asc
Description: This is a digitally signed message part
_______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
