linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCH] input_id: add touchpad quirks rules file.
@ 2010-05-13  4:03 Peter Hutterer
  2010-05-13 13:19 ` Martin Pitt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Peter Hutterer @ 2010-05-13  4:03 UTC (permalink / raw)
  To: linux-hotplug

Some devices require special tagging to apply device-dependent configuration
in X. One example are the Dell Mini touchpads that have the buttons inside
the active touchpad area, causing cursor jumps and other inconveniences.

X checks INPUT_ID.tags for matches in the xorg.conf.d snippets, so check the
product_name and apply the tag accordingly.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---

I kind-of expect some more tags like this to appear in the future, so I
figured the generic name touchpad-quirks is better than have a dell-specific
one. Would something like this be appreciated in the upstream repo?

Looking at the Ubuntu sources for the synaptics driver, the choice there is
to simply tag with the model name (e.g. "inspiron_1011") and then have the
xorg.conf hook onto this.

There's two sides to it, the Ubuntu approach is more flexible if other
configuration options are needed too, the approach here only requires
updating udev for new models but not Xorg.

Any preferences?


 Makefile.am                              |    1 +
 extras/input_id/70-touchpad-quirks.rules |   15 +++++++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)
 create mode 100644 extras/input_id/70-touchpad-quirks.rules

diff --git a/Makefile.am b/Makefile.am
index 8d13f19..18da70a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -242,6 +242,7 @@ dist_udevrules_DATA += extras/floppy/60-floppy.rules
 extras_input_id_input_id_SOURCES = extras/input_id/input_id.c
 extras_input_id_input_id_LDADD = libudev/libudev-private.la
 libexec_PROGRAMS += extras/input_id/input_id
+dist_udevrules_DATA += extras/input_id/70-touchpad-quirks.rules
 
 # ------------------------------------------------------------------------------
 # path_id - compose identifier of persistent elements of the parent buses
diff --git a/extras/input_id/70-touchpad-quirks.rules b/extras/input_id/70-touchpad-quirks.rules
new file mode 100644
index 0000000..6c65c29
--- /dev/null
+++ b/extras/input_id/70-touchpad-quirks.rules
@@ -0,0 +1,15 @@
+ACTION!="add|change", GOTO="touchpad_quirks_end"
+KERNEL!="event*", GOTO="touchpad_quirks_end"
+
+ENV{ID_INPUT_TOUCHPAD}!="1", GOTO="touchpad_quirks_end"
+
+# model specific quirks
+
+# Dell Minis have a touchpad where the buttons and the touchpad area
+# overlap. Clicking a button thus moves the pointer, this requires special
+# Xorg configuration.
+
+ATTR{[dmi/id]product_name}="Inspiron 1011|Inspiron 1012", \
+  ENV{ID_INPUT.tags}="touchpad_button_overlap"
+
+LABEL="touchpad_quirks_end"
-- 
1.7.0.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-13 23:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-13  4:03 [RFC/PATCH] input_id: add touchpad quirks rules file Peter Hutterer
2010-05-13 13:19 ` Martin Pitt
2010-05-13 13:29 ` Kay Sievers
2010-05-13 23:55 ` Peter Hutterer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).