mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-22 03:20:35 +01:00
Compare commits
20 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a4c30f546 | ||
|
|
57ad6e5994 | ||
|
|
9b4f50472f | ||
|
|
54451cb7a0 | ||
|
|
f42b8dd1ae | ||
|
|
4813e63f79 | ||
|
|
26c65758e9 | ||
|
|
a3103ded82 | ||
|
|
b8d79df696 | ||
|
|
eea702e30a | ||
|
|
0cfe00f493 | ||
|
|
0d3d885a1a | ||
|
|
6df5169229 | ||
|
|
4f2f1d29ec | ||
|
|
4c1862c1e4 | ||
|
|
a49826a7a8 | ||
|
|
f905054b5b | ||
|
|
b8f90d074e | ||
|
|
7624497df5 | ||
|
|
1ca2f11524 |
16 changed files with 420 additions and 91 deletions
140
.gitlab-ci.yml
140
.gitlab-ci.yml
|
|
@ -92,13 +92,13 @@ variables:
|
||||||
# changing these will force rebuilding the associated image
|
# changing these will force rebuilding the associated image
|
||||||
# Note: these tags have no meaning and are not tied to a particular
|
# Note: these tags have no meaning and are not tied to a particular
|
||||||
# libinput version
|
# libinput version
|
||||||
FEDORA_TAG: '2021-01-04.1'
|
FEDORA_TAG: '2021-05-12.0'
|
||||||
DEBIAN_TAG: '2021-01-04.1'
|
DEBIAN_TAG: '2021-05-12.0'
|
||||||
UBUNTU_TAG: '2021-01-04.1'
|
UBUNTU_TAG: '2021-05-12.0'
|
||||||
ARCH_TAG: '2021-01-04.1'
|
ARCH_TAG: '2021-05-12.0'
|
||||||
ALPINE_TAG: '2021-01-04.1'
|
ALPINE_TAG: '2021-05-12.0'
|
||||||
FREEBSD_TAG: '2021-01-04.1'
|
FREEBSD_TAG: '2021-05-12.0'
|
||||||
QEMU_TAG: 'qemu-vm-2021-01-04.1'
|
QEMU_TAG: 'qemu-vm-2021-05-12.0'
|
||||||
|
|
||||||
FREEBSD_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/freebsd/11.2:$FREEBSD_TAG
|
FREEBSD_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/freebsd/11.2:$FREEBSD_TAG
|
||||||
FDO_UPSTREAM_REPO: libinput/libinput
|
FDO_UPSTREAM_REPO: libinput/libinput
|
||||||
|
|
@ -179,7 +179,7 @@ check-commit:
|
||||||
# Note: images are rebuilt weekly with a scheduled pipeline with FDO_FORCE_REBUILD set
|
# Note: images are rebuilt weekly with a scheduled pipeline with FDO_FORCE_REBUILD set
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
fedora:33@qemu-prep:
|
fedora:34@qemu-prep:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.qemu-build@fedora
|
- .fdo.qemu-build@fedora
|
||||||
- .policy
|
- .policy
|
||||||
|
|
@ -188,21 +188,10 @@ fedora:33@qemu-prep:
|
||||||
- kvm
|
- kvm
|
||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
FDO_DISTRIBUTION_VERSION: 33
|
FDO_DISTRIBUTION_VERSION: 34
|
||||||
FDO_DISTRIBUTION_TAG: $QEMU_TAG
|
FDO_DISTRIBUTION_TAG: $QEMU_TAG
|
||||||
FDO_DISTRIBUTION_PACKAGES: $FEDORA_PACKAGES
|
FDO_DISTRIBUTION_PACKAGES: $FEDORA_PACKAGES
|
||||||
|
|
||||||
fedora:32@container-prep:
|
|
||||||
extends:
|
|
||||||
- .fdo.container-build@fedora
|
|
||||||
- .policy
|
|
||||||
stage: prep
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
FDO_DISTRIBUTION_VERSION: '32'
|
|
||||||
FDO_DISTRIBUTION_PACKAGES: $FEDORA_PACKAGES
|
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
|
||||||
|
|
||||||
fedora:33@container-prep:
|
fedora:33@container-prep:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.container-build@fedora
|
- .fdo.container-build@fedora
|
||||||
|
|
@ -214,6 +203,17 @@ fedora:33@container-prep:
|
||||||
FDO_DISTRIBUTION_PACKAGES: $FEDORA_PACKAGES
|
FDO_DISTRIBUTION_PACKAGES: $FEDORA_PACKAGES
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
|
|
||||||
|
fedora:34@container-prep:
|
||||||
|
extends:
|
||||||
|
- .fdo.container-build@fedora
|
||||||
|
- .policy
|
||||||
|
stage: prep
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
FDO_DISTRIBUTION_VERSION: '34'
|
||||||
|
FDO_DISTRIBUTION_PACKAGES: $FEDORA_PACKAGES
|
||||||
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
|
|
||||||
debian:stable@container-prep:
|
debian:stable@container-prep:
|
||||||
extends:
|
extends:
|
||||||
- .fdo.container-build@debian
|
- .fdo.container-build@debian
|
||||||
|
|
@ -353,15 +353,6 @@ freebsd:11.2@container-prep:
|
||||||
only:
|
only:
|
||||||
- schedules
|
- schedules
|
||||||
|
|
||||||
fedora:32@container-clean:
|
|
||||||
extends:
|
|
||||||
- .container-clean
|
|
||||||
variables:
|
|
||||||
GIT_STRATEGY: none
|
|
||||||
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
|
||||||
FDO_DISTRIBUTION_VERSION: '32'
|
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
|
||||||
|
|
||||||
fedora:33@container-clean:
|
fedora:33@container-clean:
|
||||||
extends:
|
extends:
|
||||||
- .container-clean
|
- .container-clean
|
||||||
|
|
@ -371,6 +362,15 @@ fedora:33@container-clean:
|
||||||
FDO_DISTRIBUTION_VERSION: '33'
|
FDO_DISTRIBUTION_VERSION: '33'
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
|
|
||||||
|
fedora:34@container-clean:
|
||||||
|
extends:
|
||||||
|
- .container-clean
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
CURRENT_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FDO_DISTRIBUTION_VERSION:$FDO_DISTRIBUTION_TAG
|
||||||
|
FDO_DISTRIBUTION_VERSION: '34'
|
||||||
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
|
|
||||||
debian:stable@container-clean:
|
debian:stable@container-clean:
|
||||||
extends:
|
extends:
|
||||||
- .container-clean
|
- .container-clean
|
||||||
|
|
@ -510,19 +510,19 @@ freebsd:11.2@container-clean:
|
||||||
when: script_failure
|
when: script_failure
|
||||||
|
|
||||||
|
|
||||||
.fedora:33@test-suite-vm:
|
.fedora:34@test-suite-vm:
|
||||||
extends:
|
extends:
|
||||||
- .test-suite-vm
|
- .test-suite-vm
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_VERSION: 33
|
FDO_DISTRIBUTION_VERSION: 34
|
||||||
FDO_DISTRIBUTION_TAG: $QEMU_TAG
|
FDO_DISTRIBUTION_TAG: $QEMU_TAG
|
||||||
needs:
|
needs:
|
||||||
- "fedora:33@qemu-prep"
|
- "fedora:34@qemu-prep"
|
||||||
|
|
||||||
|
|
||||||
vm-touchpad:
|
vm-touchpad:
|
||||||
extends:
|
extends:
|
||||||
- .fedora:33@test-suite-vm
|
- .fedora:34@test-suite-vm
|
||||||
variables:
|
variables:
|
||||||
SUITE_NAMES: 'touchpad'
|
SUITE_NAMES: 'touchpad'
|
||||||
|
|
||||||
|
|
@ -535,7 +535,7 @@ vm-touchpad-no-libwacom:
|
||||||
|
|
||||||
vm-tap:
|
vm-tap:
|
||||||
extends:
|
extends:
|
||||||
- .fedora:33@test-suite-vm
|
- .fedora:34@test-suite-vm
|
||||||
variables:
|
variables:
|
||||||
SUITE_NAMES: 'touchpad-tap'
|
SUITE_NAMES: 'touchpad-tap'
|
||||||
|
|
||||||
|
|
@ -548,7 +548,7 @@ vm-tap-no-libwacom:
|
||||||
|
|
||||||
vm-touchpad-buttons:
|
vm-touchpad-buttons:
|
||||||
extends:
|
extends:
|
||||||
- .fedora:33@test-suite-vm
|
- .fedora:34@test-suite-vm
|
||||||
variables:
|
variables:
|
||||||
SUITE_NAMES: 'touchpad-buttons'
|
SUITE_NAMES: 'touchpad-buttons'
|
||||||
|
|
||||||
|
|
@ -561,7 +561,7 @@ vm-touchpad-buttons-no-libwacom:
|
||||||
|
|
||||||
vm-tablet:
|
vm-tablet:
|
||||||
extends:
|
extends:
|
||||||
- .fedora:33@test-suite-vm
|
- .fedora:34@test-suite-vm
|
||||||
variables:
|
variables:
|
||||||
SUITE_NAMES: 'tablet'
|
SUITE_NAMES: 'tablet'
|
||||||
|
|
||||||
|
|
@ -574,7 +574,7 @@ vm-tablet-no-libwacom:
|
||||||
|
|
||||||
vm-gestures-device:
|
vm-gestures-device:
|
||||||
extends:
|
extends:
|
||||||
- .fedora:33@test-suite-vm
|
- .fedora:34@test-suite-vm
|
||||||
variables:
|
variables:
|
||||||
SUITE_NAMES: 'gestures device'
|
SUITE_NAMES: 'gestures device'
|
||||||
|
|
||||||
|
|
@ -587,7 +587,7 @@ vm-gestures-device-no-libwacom:
|
||||||
|
|
||||||
vm-backends:
|
vm-backends:
|
||||||
extends:
|
extends:
|
||||||
- .fedora:33@test-suite-vm
|
- .fedora:34@test-suite-vm
|
||||||
variables:
|
variables:
|
||||||
SUITE_NAMES: 'path udev'
|
SUITE_NAMES: 'path udev'
|
||||||
|
|
||||||
|
|
@ -600,7 +600,7 @@ vm-backends-no-libwacom:
|
||||||
|
|
||||||
vm-misc:
|
vm-misc:
|
||||||
extends:
|
extends:
|
||||||
- .fedora:33@test-suite-vm
|
- .fedora:34@test-suite-vm
|
||||||
variables:
|
variables:
|
||||||
SUITE_NAMES: 'log misc quirks'
|
SUITE_NAMES: 'log misc quirks'
|
||||||
|
|
||||||
|
|
@ -613,7 +613,7 @@ vm-misc-no-libwacom:
|
||||||
|
|
||||||
vm-other devices:
|
vm-other devices:
|
||||||
extends:
|
extends:
|
||||||
- .fedora:33@test-suite-vm
|
- .fedora:34@test-suite-vm
|
||||||
variables:
|
variables:
|
||||||
SUITE_NAMES: 'keyboard pad switch trackball trackpoint totem touch'
|
SUITE_NAMES: 'keyboard pad switch trackball trackpoint totem touch'
|
||||||
|
|
||||||
|
|
@ -626,7 +626,7 @@ vm-other devices-no-libwacom:
|
||||||
|
|
||||||
vm-pointer:
|
vm-pointer:
|
||||||
extends:
|
extends:
|
||||||
- .fedora:33@test-suite-vm
|
- .fedora:34@test-suite-vm
|
||||||
variables:
|
variables:
|
||||||
SUITE_NAMES: 'pointer'
|
SUITE_NAMES: 'pointer'
|
||||||
|
|
||||||
|
|
@ -707,12 +707,12 @@ vm-valgrind-pointer:
|
||||||
- .fdo.distribution-image@fedora
|
- .fdo.distribution-image@fedora
|
||||||
- .build@template
|
- .build@template
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_VERSION: '33'
|
FDO_DISTRIBUTION_VERSION: '34'
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
needs:
|
needs:
|
||||||
- "fedora:33@container-prep"
|
- "fedora:34@container-prep"
|
||||||
|
|
||||||
default-build-release@fedora:33:
|
default-build-release@fedora:34:
|
||||||
stage: distro
|
stage: distro
|
||||||
extends:
|
extends:
|
||||||
- .fedora-build@template
|
- .fedora-build@template
|
||||||
|
|
@ -720,7 +720,7 @@ default-build-release@fedora:33:
|
||||||
MESON_ARGS: "-Dbuildtype=release"
|
MESON_ARGS: "-Dbuildtype=release"
|
||||||
CFLAGS: "-Werror"
|
CFLAGS: "-Werror"
|
||||||
|
|
||||||
scan-build@fedora:33:
|
scan-build@fedora:34:
|
||||||
extends:
|
extends:
|
||||||
- .fedora-build@template
|
- .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -739,13 +739,13 @@ scan-build@fedora:33:
|
||||||
# run them on one image, they shouldn't fail on one distro
|
# run them on one image, they shouldn't fail on one distro
|
||||||
# when they succeed on another.
|
# when they succeed on another.
|
||||||
|
|
||||||
build-no-libwacom@fedora:33:
|
build-no-libwacom@fedora:34:
|
||||||
extends:
|
extends:
|
||||||
- .fedora-build@template
|
- .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
MESON_ARGS: "-Dlibwacom=false"
|
MESON_ARGS: "-Dlibwacom=false"
|
||||||
|
|
||||||
build-no-libwacom-nodeps@fedora:33:
|
build-no-libwacom-nodeps@fedora:34:
|
||||||
extends:
|
extends:
|
||||||
- .fedora-build@template
|
- .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -753,13 +753,13 @@ build-no-libwacom-nodeps@fedora:33:
|
||||||
before_script:
|
before_script:
|
||||||
- dnf remove -y libwacom libwacom-devel
|
- dnf remove -y libwacom libwacom-devel
|
||||||
|
|
||||||
build-no-docs@fedora:33:
|
build-no-docs@fedora:34:
|
||||||
extends:
|
extends:
|
||||||
- .fedora-build@template
|
- .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
MESON_ARGS: "-Ddocumentation=false"
|
MESON_ARGS: "-Ddocumentation=false"
|
||||||
|
|
||||||
build-no-docs-nodeps@fedora:33:
|
build-no-docs-nodeps@fedora:34:
|
||||||
extends:
|
extends:
|
||||||
- .fedora-build@template
|
- .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -767,13 +767,13 @@ build-no-docs-nodeps@fedora:33:
|
||||||
before_script:
|
before_script:
|
||||||
- dnf remove -y doxygen graphviz
|
- dnf remove -y doxygen graphviz
|
||||||
|
|
||||||
build-no-debuggui@fedora:33:
|
build-no-debuggui@fedora:34:
|
||||||
extends:
|
extends:
|
||||||
- .fedora-build@template
|
- .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
MESON_ARGS: "-Ddebug-gui=false"
|
MESON_ARGS: "-Ddebug-gui=false"
|
||||||
|
|
||||||
build-no-debuggui-nodeps@fedora:33:
|
build-no-debuggui-nodeps@fedora:34:
|
||||||
extends:
|
extends:
|
||||||
- .fedora-build@template
|
- .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -781,13 +781,13 @@ build-no-debuggui-nodeps@fedora:33:
|
||||||
before_script:
|
before_script:
|
||||||
- dnf remove -y gtk3-devel
|
- dnf remove -y gtk3-devel
|
||||||
|
|
||||||
build-no-tests@fedora:33:
|
build-no-tests@fedora:34:
|
||||||
extends:
|
extends:
|
||||||
- .fedora-build@template
|
- .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
MESON_ARGS: "-Dtests=false"
|
MESON_ARGS: "-Dtests=false"
|
||||||
|
|
||||||
build-no-tests-nodeps@fedora:33:
|
build-no-tests-nodeps@fedora:34:
|
||||||
extends:
|
extends:
|
||||||
- .fedora-build@template
|
- .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -795,7 +795,7 @@ build-no-tests-nodeps@fedora:33:
|
||||||
before_script:
|
before_script:
|
||||||
- dnf remove -y check-devel
|
- dnf remove -y check-devel
|
||||||
|
|
||||||
valgrind@fedora:33:
|
valgrind@fedora:34:
|
||||||
extends:
|
extends:
|
||||||
- .fedora-build@template
|
- .fedora-build@template
|
||||||
variables:
|
variables:
|
||||||
|
|
@ -805,7 +805,7 @@ valgrind@fedora:33:
|
||||||
|
|
||||||
# Python checks, only run on Fedora
|
# Python checks, only run on Fedora
|
||||||
|
|
||||||
usr-bin-env-python@fedora:33:
|
usr-bin-env-python@fedora:34:
|
||||||
extends:
|
extends:
|
||||||
- .fedora-build@template
|
- .fedora-build@template
|
||||||
script:
|
script:
|
||||||
|
|
@ -815,7 +815,7 @@ usr-bin-env-python@fedora:33:
|
||||||
/bin/false
|
/bin/false
|
||||||
fi
|
fi
|
||||||
|
|
||||||
python-format@fedora:33:
|
python-format@fedora:34:
|
||||||
extends:
|
extends:
|
||||||
- .fedora-build@template
|
- .fedora-build@template
|
||||||
before_script:
|
before_script:
|
||||||
|
|
@ -917,18 +917,6 @@ coverity:
|
||||||
# #
|
# #
|
||||||
#################################################################
|
#################################################################
|
||||||
|
|
||||||
fedora:32@default-build:
|
|
||||||
stage: distro
|
|
||||||
extends:
|
|
||||||
- .build@template
|
|
||||||
- .fdo.distribution-image@fedora
|
|
||||||
variables:
|
|
||||||
FDO_DISTRIBUTION_VERSION: '32'
|
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
|
||||||
needs:
|
|
||||||
- "fedora:32@container-prep"
|
|
||||||
|
|
||||||
|
|
||||||
fedora:33@default-build:
|
fedora:33@default-build:
|
||||||
stage: distro
|
stage: distro
|
||||||
extends:
|
extends:
|
||||||
|
|
@ -941,6 +929,18 @@ fedora:33@default-build:
|
||||||
- "fedora:33@container-prep"
|
- "fedora:33@container-prep"
|
||||||
|
|
||||||
|
|
||||||
|
fedora:34@default-build:
|
||||||
|
stage: distro
|
||||||
|
extends:
|
||||||
|
- .build@template
|
||||||
|
- .fdo.distribution-image@fedora
|
||||||
|
variables:
|
||||||
|
FDO_DISTRIBUTION_VERSION: '34'
|
||||||
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
|
needs:
|
||||||
|
- "fedora:34@container-prep"
|
||||||
|
|
||||||
|
|
||||||
debian:stable@default-build:
|
debian:stable@default-build:
|
||||||
stage: distro
|
stage: distro
|
||||||
extends:
|
extends:
|
||||||
|
|
@ -1051,10 +1051,10 @@ build rpm:
|
||||||
- .policy
|
- .policy
|
||||||
stage: deploy
|
stage: deploy
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_VERSION: '32'
|
FDO_DISTRIBUTION_VERSION: '34'
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
needs:
|
needs:
|
||||||
- "fedora:32@container-prep"
|
- "fedora:33@container-prep"
|
||||||
script:
|
script:
|
||||||
- dnf install -y rpmdevtools jq
|
- dnf install -y rpmdevtools jq
|
||||||
- meson "$MESON_BUILDDIR"
|
- meson "$MESON_BUILDDIR"
|
||||||
|
|
|
||||||
|
|
@ -704,10 +704,10 @@ build rpm:
|
||||||
- .policy
|
- .policy
|
||||||
stage: deploy
|
stage: deploy
|
||||||
variables:
|
variables:
|
||||||
FDO_DISTRIBUTION_VERSION: '32'
|
FDO_DISTRIBUTION_VERSION: '34'
|
||||||
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
FDO_DISTRIBUTION_TAG: $FEDORA_TAG
|
||||||
needs:
|
needs:
|
||||||
- "fedora:32@container-prep"
|
- "fedora:33@container-prep"
|
||||||
script:
|
script:
|
||||||
- dnf install -y rpmdevtools jq
|
- dnf install -y rpmdevtools jq
|
||||||
- meson "$MESON_BUILDDIR"
|
- meson "$MESON_BUILDDIR"
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,14 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# We're happy to rebuild all containers when one changes.
|
# We're happy to rebuild all containers when one changes.
|
||||||
.default_tag: &default_tag '2021-01-04.1'
|
.default_tag: &default_tag '2021-05-12.0'
|
||||||
|
|
||||||
distributions:
|
distributions:
|
||||||
- name: fedora
|
- name: fedora
|
||||||
tag: *default_tag
|
tag: *default_tag
|
||||||
versions:
|
versions:
|
||||||
- '32'
|
|
||||||
- '33'
|
- '33'
|
||||||
|
- '34' # last is picked for qemu
|
||||||
want_qemu: true
|
want_qemu: true
|
||||||
use_for_custom_build_tests: true
|
use_for_custom_build_tests: true
|
||||||
packages:
|
packages:
|
||||||
|
|
|
||||||
|
|
@ -163,12 +163,35 @@ __all_seats()
|
||||||
':device:_files -W /dev/input/ -P /dev/input/'
|
':device:_files -W /dev/input/ -P /dev/input/'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(( $+functions[_libinput_analyze_per-slot-delta] )) || _libinput_analyze_per-slot-delta()
|
||||||
|
{
|
||||||
|
_arguments \
|
||||||
|
'--help[Show help message and exit]' \
|
||||||
|
':recording:_files'
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_libinput_analyze_touch-down-state] )) || _libinput_analyze_touch-down-state()
|
||||||
|
{
|
||||||
|
_arguments \
|
||||||
|
'--help[Show help message and exit]' \
|
||||||
|
':recording:_files'
|
||||||
|
}
|
||||||
|
|
||||||
|
(( $+functions[_libinput_analyze_recording] )) || _libinput_analyze_recording()
|
||||||
|
{
|
||||||
|
_arguments \
|
||||||
|
'--help[Show help message and exit]' \
|
||||||
|
':recording:_files'
|
||||||
|
}
|
||||||
|
|
||||||
(( $+functions[_libinput_analyze] )) || _libinput_analyze()
|
(( $+functions[_libinput_analyze] )) || _libinput_analyze()
|
||||||
{
|
{
|
||||||
local curcontext=$curcontext state line ret=1
|
local curcontext=$curcontext state line ret=1
|
||||||
local features
|
local features
|
||||||
features=(
|
features=(
|
||||||
"per-slot-delta:analyze relative movement per touch per slot"
|
"per-slot-delta:analyze relative movement per touch per slot"
|
||||||
|
"recording:analyze a recording by printing a pretty table"
|
||||||
|
"touch-down-state:analyze a recording for logical touch down states"
|
||||||
)
|
)
|
||||||
|
|
||||||
_arguments -C \
|
_arguments -C \
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,11 @@ libinput applies a dpi-dependent acceleration function. At low speeds, a
|
||||||
movement speed increases, acceleration is applied - at high speeds a low-dpi
|
movement speed increases, acceleration is applied - at high speeds a low-dpi
|
||||||
device will roughly feel the same as a higher-dpi mouse.
|
device will roughly feel the same as a higher-dpi mouse.
|
||||||
|
|
||||||
|
The reason for the normalization is convenience: a caller can assume that a
|
||||||
|
delta of 1 should result in a movement of 1 pixel on a traditional
|
||||||
|
(low-dpi) screen. On screens with high resolutions, the caller must scale
|
||||||
|
according to the UI scale factors.
|
||||||
|
|
||||||
This normalization only applies to accelerated coordinates, unaccelerated
|
This normalization only applies to accelerated coordinates, unaccelerated
|
||||||
coordinates are left in device-units. It is up to the caller to interpret
|
coordinates are left in device-units. It is up to the caller to interpret
|
||||||
those coordinates correctly.
|
those coordinates correctly.
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
project('libinput', 'c',
|
project('libinput', 'c',
|
||||||
version : '1.17.0',
|
version : '1.17.3',
|
||||||
license : 'MIT/Expat',
|
license : 'MIT/Expat',
|
||||||
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
|
default_options : [ 'c_std=gnu99', 'warning_level=2' ],
|
||||||
meson_version : '>= 0.47.0')
|
meson_version : '>= 0.47.0')
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,175 @@
|
||||||
# Do not edit this file, it will be overwritten on update
|
# Do not edit this file, it will be overwritten on update
|
||||||
|
|
||||||
[Razer Blade Keyboard]
|
[Razer Blade Lid Switch]
|
||||||
|
MatchName=*Lid Switch*
|
||||||
|
MatchDMIModalias=dmi:*svnRazer:pnBlade*
|
||||||
|
AttrLidSwitchReliability=write_open
|
||||||
|
|
||||||
|
[RazerBladeStealth Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x0205
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBladeStealthLate2016 Keyboard]
|
||||||
MatchUdevType=keyboard
|
MatchUdevType=keyboard
|
||||||
MatchBus=usb
|
MatchBus=usb
|
||||||
MatchVendor=0x1532
|
MatchVendor=0x1532
|
||||||
MatchProduct=0x0220
|
MatchProduct=0x0220
|
||||||
AttrKeyboardIntegration=internal
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
[Razer Blade Keyboard]
|
[RazerBladeProLate2016 Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x0210
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBladeLate2016 Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x0224
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBladeQHD Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x020F
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBladeStealthMid2017 Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x022D
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBladePro2017 Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x0225
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBladePro2017FullHD Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x022F
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBladeStealthLate2017 Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x0232
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBlade2018 Keyboard]
|
||||||
MatchUdevType=keyboard
|
MatchUdevType=keyboard
|
||||||
MatchBus=usb
|
MatchBus=usb
|
||||||
MatchVendor=0x1532
|
MatchVendor=0x1532
|
||||||
MatchProduct=0x0233
|
MatchProduct=0x0233
|
||||||
AttrKeyboardIntegration=internal
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
[Razer Blade Lid Switch]
|
[RazerBlade2018Mercury Keyboard]
|
||||||
MatchName=*Lid Switch*
|
MatchUdevType=keyboard
|
||||||
MatchDMIModalias=dmi:*svnRazer:pnBlade*
|
MatchBus=usb
|
||||||
AttrLidSwitchReliability=write_open
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x0240
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBlade2018Base Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x023B
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBladeStealth2019 Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x0239
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBladeStealthLate2019 Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x024A
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBladeStealthEarly2020 Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x0252
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBladeStealthLate2020 Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x0259
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBlade2019Adv Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x023A
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBladeMid2019Mercury Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x0245
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBlade2019Base Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x0246
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBladeEarly2020Base Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x0255
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBladeProLate2019 Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x024C
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBlade2019StudioEdition Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x024D
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBladePro2019 Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x0234
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[RazerBlade15Advanced2020 Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x1532
|
||||||
|
MatchProduct=0x0253
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,12 @@ AttrTouchSizeRange=150:130
|
||||||
MatchName=*Apple Inc. Apple Internal Keyboard*
|
MatchName=*Apple Inc. Apple Internal Keyboard*
|
||||||
AttrKeyboardIntegration=internal
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[Apple Internal Keyboard (SPI)]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=spi
|
||||||
|
MatchVendor=0x5AC
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
# The Apple MagicMouse has a touchpad built-in but the kernel still
|
# The Apple MagicMouse has a touchpad built-in but the kernel still
|
||||||
# emulates a full 2/3 button mouse for us. Ignore anything from the
|
# emulates a full 2/3 button mouse for us. Ignore anything from the
|
||||||
# ABS interface
|
# ABS interface
|
||||||
|
|
@ -89,3 +95,22 @@ MatchBus=usb
|
||||||
MatchVendor=0x5AC
|
MatchVendor=0x5AC
|
||||||
MatchProduct=0x0262
|
MatchProduct=0x0262
|
||||||
AttrPalmSizeThreshold=1600
|
AttrPalmSizeThreshold=1600
|
||||||
|
|
||||||
|
[Apple Laptop Touchpad (SPI)]
|
||||||
|
MatchUdevType=touchpad
|
||||||
|
MatchBus=spi
|
||||||
|
MatchVendor=0x5AC
|
||||||
|
ModelAppleTouchpad=1
|
||||||
|
AttrSizeHint=104x75
|
||||||
|
AttrTouchSizeRange=150:130
|
||||||
|
AttrPalmSizeThreshold=1600
|
||||||
|
|
||||||
|
# The Linux applespi driver currently uses the Synaptics vendor for some reason
|
||||||
|
[Apple Laptop Touchpad (SPI)]
|
||||||
|
MatchUdevType=touchpad
|
||||||
|
MatchBus=spi
|
||||||
|
MatchVendor=0x6CB
|
||||||
|
ModelAppleTouchpad=1
|
||||||
|
AttrSizeHint=104x75
|
||||||
|
AttrTouchSizeRange=150:130
|
||||||
|
AttrPalmSizeThreshold=1600
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,12 @@ MatchName=*DualPoint Stick
|
||||||
MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE7470*
|
MatchDMIModalias=dmi:*svnDellInc.:pnLatitudeE7470*
|
||||||
AttrTrackpointMultiplier=0.125
|
AttrTrackpointMultiplier=0.125
|
||||||
|
|
||||||
|
[Latitude 7490 Trackpoint]
|
||||||
|
MatchName=*Mouse
|
||||||
|
MatchUdevType=pointingstick
|
||||||
|
MatchDMIModalias=dmi:**bvnDellInc.:*:pnLatitude7490*
|
||||||
|
AttrTrackpointMultiplier=0.3
|
||||||
|
|
||||||
[Precision 7x50 Touchpad]
|
[Precision 7x50 Touchpad]
|
||||||
MatchBus=i2c
|
MatchBus=i2c
|
||||||
MatchUdevType=touchpad
|
MatchUdevType=touchpad
|
||||||
|
|
|
||||||
5
quirks/50-system-gigabyte.quirks
Normal file
5
quirks/50-system-gigabyte.quirks
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
[Gigabyte Aero 15 touchpad]
|
||||||
|
MatchUdevType=touchpad
|
||||||
|
MatchName=ETPS/2 Elantech Touchpad
|
||||||
|
MatchDMIModalias=dmi:*svnGIGABYTE:pnAERO15-XA*
|
||||||
|
AttrPalmSizeThreshold=800
|
||||||
|
|
@ -89,7 +89,7 @@ ModelChromebook=1
|
||||||
|
|
||||||
[Google Chromebook Eve]
|
[Google Chromebook Eve]
|
||||||
MatchUdevType=touchpad
|
MatchUdevType=touchpad
|
||||||
MatchName=ACPI0C50:00 18D1:5028
|
MatchName=ACPI0C50:00 18D1:5028*
|
||||||
MatchDMIModalias=dmi:*svnGoogle:pnEve*
|
MatchDMIModalias=dmi:*svnGoogle:pnEve*
|
||||||
ModelChromebook=1
|
ModelChromebook=1
|
||||||
AttrPressureRange=6:4
|
AttrPressureRange=6:4
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ ModelHPPavilionDM4Touchpad=1
|
||||||
# Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see
|
# Touchpad is a clickpad but INPUT_PROP_BUTTONPAD is not set, see
|
||||||
# https://bugs.freedesktop.org/show_bug.cgi?id=97147
|
# https://bugs.freedesktop.org/show_bug.cgi?id=97147
|
||||||
[HP Stream 11]
|
[HP Stream 11]
|
||||||
MatchName=SYN1EDE:00 06CB:7442
|
MatchName=SYN1EDE:00 06CB:7442*
|
||||||
MatchDMIModalias=dmi:*svnHewlett-Packard:pnHPStreamNotebookPC11*
|
MatchDMIModalias=dmi:*svnHewlett-Packard:pnHPStreamNotebookPC11*
|
||||||
AttrInputPropEnable=INPUT_PROP_BUTTONPAD
|
AttrInputPropEnable=INPUT_PROP_BUTTONPAD
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -205,3 +205,36 @@ ModelTabletModeNoSuspend=1
|
||||||
MatchName=AT Raw Set 2 keyboard
|
MatchName=AT Raw Set 2 keyboard
|
||||||
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX1Tablet:*
|
MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkPadX1Tablet:*
|
||||||
ModelTabletModeNoSuspend=1
|
ModelTabletModeNoSuspend=1
|
||||||
|
|
||||||
|
# Misidentified as an external keyboard by libinput
|
||||||
|
# Tested on Legion 5 15AR05H
|
||||||
|
[Lenovo Legion 5 Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x048D
|
||||||
|
MatchProduct=0xC100
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
[Lenovo Legion 5 Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x048D
|
||||||
|
MatchProduct=0xC955
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
# Tested on Lenovo Legion 5 Pro 16ACH6H
|
||||||
|
[Lenovo Legion 5 Pro Keyboard]
|
||||||
|
MatchUdevType=keyboard
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x048D
|
||||||
|
MatchProduct=0xC101
|
||||||
|
AttrKeyboardIntegration=internal
|
||||||
|
|
||||||
|
# https://gitlab.freedesktop.org/libinput/libinput/-/issues/604
|
||||||
|
[Lenovo Yoga Slim 9 14ITL5 Pressurepad]
|
||||||
|
MatchBus=i2c
|
||||||
|
MatchVendor=0x27C6
|
||||||
|
MatchProduct=0x01E8
|
||||||
|
AttrEventCodeDisable=ABS_MT_PRESSURE;ABS_PRESSURE;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ pad_led_new(struct libinput *libinput, const char *prefix, int group, int mode)
|
||||||
if (rc == -1)
|
if (rc == -1)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
fd = open_restricted(libinput, path, O_RDONLY);
|
fd = open_restricted(libinput, path, O_RDONLY | O_NONBLOCK | O_CLOEXEC);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
errno = -fd;
|
errno = -fd;
|
||||||
goto error;
|
goto error;
|
||||||
|
|
|
||||||
|
|
@ -1024,6 +1024,7 @@ evdev_note_time_delay(struct evdev_device *device,
|
||||||
{
|
{
|
||||||
struct libinput *libinput = evdev_libinput_context(device);
|
struct libinput *libinput = evdev_libinput_context(device);
|
||||||
uint32_t tdelta;
|
uint32_t tdelta;
|
||||||
|
uint64_t eventtime = input_event_time(ev);
|
||||||
|
|
||||||
/* if we have a current libinput_dispatch() snapshot, compare our
|
/* if we have a current libinput_dispatch() snapshot, compare our
|
||||||
* event time with the one from the snapshot. If we have more than
|
* event time with the one from the snapshot. If we have more than
|
||||||
|
|
@ -1031,10 +1032,11 @@ evdev_note_time_delay(struct evdev_device *device,
|
||||||
* where there is no steady event flow and thus SYN_DROPPED may not
|
* where there is no steady event flow and thus SYN_DROPPED may not
|
||||||
* get hit by the kernel despite us being too slow.
|
* get hit by the kernel despite us being too slow.
|
||||||
*/
|
*/
|
||||||
if (libinput->dispatch_time == 0)
|
if (libinput->dispatch_time == 0 ||
|
||||||
|
eventtime > libinput->dispatch_time)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tdelta = us2ms(libinput->dispatch_time - input_event_time(ev));
|
tdelta = us2ms(libinput->dispatch_time - eventtime);
|
||||||
if (tdelta > 10) {
|
if (tdelta > 10) {
|
||||||
evdev_log_bug_client_ratelimit(device,
|
evdev_log_bug_client_ratelimit(device,
|
||||||
&device->delay_warning_limit,
|
&device->delay_warning_limit,
|
||||||
|
|
|
||||||
85
src/quirks.c
85
src/quirks.c
|
|
@ -35,6 +35,9 @@
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
#include <kenv.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "libinput-versionsort.h"
|
#include "libinput-versionsort.h"
|
||||||
#include "libinput-util.h"
|
#include "libinput-util.h"
|
||||||
|
|
@ -111,6 +114,7 @@ enum bustype {
|
||||||
BT_PS2,
|
BT_PS2,
|
||||||
BT_RMI,
|
BT_RMI,
|
||||||
BT_I2C,
|
BT_I2C,
|
||||||
|
BT_SPI,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum udev_type {
|
enum udev_type {
|
||||||
|
|
@ -352,10 +356,11 @@ property_cleanup(struct property *p)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the dmi modalias from the udev device.
|
* Return the system DMI info in modalias format.
|
||||||
*/
|
*/
|
||||||
|
#ifdef __linux__
|
||||||
static inline char *
|
static inline char *
|
||||||
init_dmi(void)
|
init_dmi_linux(void)
|
||||||
{
|
{
|
||||||
struct udev *udev;
|
struct udev *udev;
|
||||||
struct udev_device *udev_device;
|
struct udev_device *udev_device;
|
||||||
|
|
@ -363,9 +368,6 @@ init_dmi(void)
|
||||||
char *copy = NULL;
|
char *copy = NULL;
|
||||||
const char *syspath = "/sys/devices/virtual/dmi/id";
|
const char *syspath = "/sys/devices/virtual/dmi/id";
|
||||||
|
|
||||||
if (getenv("LIBINPUT_RUNNING_TEST_SUITE"))
|
|
||||||
return safe_strdup("dmi:");
|
|
||||||
|
|
||||||
udev = udev_new();
|
udev = udev_new();
|
||||||
if (!udev)
|
if (!udev)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
@ -388,6 +390,73 @@ init_dmi(void)
|
||||||
|
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
static inline char *
|
||||||
|
init_dmi_freebsd(void)
|
||||||
|
{
|
||||||
|
#define LEN (KENV_MVALLEN + 1)
|
||||||
|
char *modalias;
|
||||||
|
char bios_vendor[LEN], bios_version[LEN], bios_date[LEN];
|
||||||
|
char sys_vendor[LEN], product_name[LEN], product_version[LEN];
|
||||||
|
char board_vendor[LEN], board_name[LEN], board_version[LEN];
|
||||||
|
char chassis_vendor[LEN], chassis_type[LEN], chassis_version[LEN];
|
||||||
|
int chassis_type_num = 0x2;
|
||||||
|
|
||||||
|
kenv(KENV_GET, "smbios.bios.vendor", bios_vendor, LEN);
|
||||||
|
kenv(KENV_GET, "smbios.bios.version", bios_version, LEN);
|
||||||
|
kenv(KENV_GET, "smbios.bios.reldate", bios_date, LEN);
|
||||||
|
kenv(KENV_GET, "smbios.system.maker", sys_vendor, LEN);
|
||||||
|
kenv(KENV_GET, "smbios.system.product", product_name, LEN);
|
||||||
|
kenv(KENV_GET, "smbios.system.version", product_version, LEN);
|
||||||
|
kenv(KENV_GET, "smbios.planar.maker", board_vendor, LEN);
|
||||||
|
kenv(KENV_GET, "smbios.planar.product", board_name, LEN);
|
||||||
|
kenv(KENV_GET, "smbios.planar.version", board_version, LEN);
|
||||||
|
kenv(KENV_GET, "smbios.chassis.vendor", chassis_vendor, LEN);
|
||||||
|
kenv(KENV_GET, "smbios.chassis.type", chassis_type, LEN);
|
||||||
|
kenv(KENV_GET, "smbios.chassis.version", chassis_version, LEN);
|
||||||
|
#undef LEN
|
||||||
|
|
||||||
|
if (strcmp(chassis_type, "Desktop") == 0)
|
||||||
|
chassis_type_num = 0x3;
|
||||||
|
else if (strcmp(chassis_type, "Portable") == 0)
|
||||||
|
chassis_type_num = 0x8;
|
||||||
|
else if (strcmp(chassis_type, "Laptop") == 0)
|
||||||
|
chassis_type_num = 0x9;
|
||||||
|
else if (strcmp(chassis_type, "Notebook") == 0)
|
||||||
|
chassis_type_num = 0xA;
|
||||||
|
else if (strcmp(chassis_type, "Tablet") == 0)
|
||||||
|
chassis_type_num = 0x1E;
|
||||||
|
else if (strcmp(chassis_type, "Convertible") == 0)
|
||||||
|
chassis_type_num = 0x1F;
|
||||||
|
else if (strcmp(chassis_type, "Detachable") == 0)
|
||||||
|
chassis_type_num = 0x20;
|
||||||
|
|
||||||
|
xasprintf(&modalias,
|
||||||
|
"dmi:bvn%s:bvr%s:bd%s:svn%s:pn%s:pvr%s:rvn%s:rn%s:rvr%s:cvn%s:ct%d:cvr%s:",
|
||||||
|
bios_vendor, bios_version, bios_date, sys_vendor, product_name,
|
||||||
|
product_version, board_vendor, board_name, board_version, chassis_vendor,
|
||||||
|
chassis_type_num, chassis_version);
|
||||||
|
|
||||||
|
return modalias;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static inline char *
|
||||||
|
init_dmi(void)
|
||||||
|
{
|
||||||
|
if (getenv("LIBINPUT_RUNNING_TEST_SUITE"))
|
||||||
|
return safe_strdup("dmi:");
|
||||||
|
|
||||||
|
#if defined(__linux__)
|
||||||
|
return init_dmi_linux();
|
||||||
|
#elif defined(__FreeBSD__)
|
||||||
|
return init_dmi_freebsd();
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the dt compatible string
|
* Return the dt compatible string
|
||||||
|
|
@ -499,6 +568,8 @@ parse_match(struct quirks_context *ctx,
|
||||||
s->match.bus = BT_RMI;
|
s->match.bus = BT_RMI;
|
||||||
else if (streq(value, "i2c"))
|
else if (streq(value, "i2c"))
|
||||||
s->match.bus = BT_I2C;
|
s->match.bus = BT_I2C;
|
||||||
|
else if (streq(value, "spi"))
|
||||||
|
s->match.bus = BT_SPI;
|
||||||
else
|
else
|
||||||
goto out;
|
goto out;
|
||||||
} else if (streq(key, "MatchVendor")) {
|
} else if (streq(key, "MatchVendor")) {
|
||||||
|
|
@ -1241,6 +1312,10 @@ match_fill_bus_vid_pid(struct match *m,
|
||||||
m->bus = BT_I2C;
|
m->bus = BT_I2C;
|
||||||
m->bits |= M_BUS;
|
m->bits |= M_BUS;
|
||||||
break;
|
break;
|
||||||
|
case BUS_SPI:
|
||||||
|
m->bus = BT_SPI;
|
||||||
|
m->bits |= M_BUS;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue