[PATCH libinput v2 0/5] Disable laptop touchpad on lid close

James Ye jye836 at gmail.com
Tue Jan 10 01:24:20 UTC 2017


Although a laptop touchpad is usually not accessible when the lid is closed,
some laptop models suffer from a hardware bug where the touchpad can be
activated even if the lid is closed.  This bug can be worked around by disabling
the touchpad when the lid is closed.

This patch set adds:
1: hwdb patch to mark switches as input devices (needs to go to systemd)
2: switch interface[1]
3: evdev dispatch interface for laptop lid switches
4: mechanism for pairing touchpad with lid, and disabling the touchpad
5: test cases

Changes since v1:
all sets:
 - signed off
set 2:
 - doxygen fixes
 - updated commit message
set 3:
 - style and text fixes
 - updated commit message
set 5:
 - improved tests
 - added duplicate event test
 - added event conversion test

Cheers,
  James

[1]: https://lists.freedesktop.org/archives/wayland-devel/2016-January/026349.html

James Ye (5):
  udev: mark switches as input devices
  Add a "switch" interface for parts of the SW_* range
  Add evdev_dispatch interface for lid switch
  Pair touchpad and lid_switch for disable
  test: add tests for lid switch

 doc/Makefile.am                    |   1 +
 doc/switches.dox                   |  16 +++
 src/evdev-mt-touchpad.c            |  47 +++++++
 src/evdev-mt-touchpad.h            |   5 +
 src/evdev.c                        |  94 ++++++++++++-
 src/evdev.h                        |   8 ++
 src/libinput-private.h             |   5 +
 src/libinput.c                     | 103 +++++++++++++++
 src/libinput.h                     | 121 +++++++++++++++++
 src/libinput.sym                   |   9 ++
 test/Makefile.am                   |   4 +-
 test/lid.c                         | 263 +++++++++++++++++++++++++++++++++++++
 test/litest-device-lid-switch.c    |  58 ++++++++
 test/litest.c                      |  33 +++++
 test/litest.h                      |  11 ++
 test/misc.c                        |  50 +++++++
 tools/event-debug.c                |  34 +++++
 udev/90-libinput-model-quirks.hwdb |   6 +
 18 files changed, 865 insertions(+), 3 deletions(-)
 create mode 100644 doc/switches.dox
 create mode 100644 test/lid.c
 create mode 100644 test/litest-device-lid-switch.c

-- 
2.9.3



More information about the wayland-devel mailing list