Skip to content

Commit

Permalink
Bring the AsahiLinux/PKGBUILDs patchsets
Browse files Browse the repository at this point in the history
  • Loading branch information
kit-ty-kate committed Nov 28, 2022
1 parent a282c5f commit 124e6a8
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 10 deletions.
41 changes: 41 additions & 0 deletions 0001-quirks-Add-Apple-MTP-touchpad-quirk.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From 6f417fec0071fa2814d4449cc78db8da8f009d99 Mon Sep 17 00:00:00 2001
From: Hector Martin <marcan@marcan.st>
Date: Tue, 22 Nov 2022 13:52:24 +0900
Subject: [PATCH] quirks: Add Apple MTP touchpad quirk

Apple M2 (and presumably newer) laptops now embed the touchpad
controller into the main SoC, and use a new internal communications
protocol between it and the main CPU. This isn't really a "bus" like
SPI or I2C, so the downstream kernel driver currently uses the (not
well supported) HOST bus type. MatchBus can't match on that, so let's
just use a name match (plus the vendor ID, which is still valid and
the usual Apple one).

Signed-off-by: Hector Martin <marcan@marcan.st>
---
quirks/50-system-apple.quirks | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/quirks/50-system-apple.quirks b/quirks/50-system-apple.quirks
index 7f7a81cd36d5..a6d6eea91d5a 100644
--- a/quirks/50-system-apple.quirks
+++ b/quirks/50-system-apple.quirks
@@ -105,6 +105,15 @@ AttrSizeHint=104x75
AttrTouchSizeRange=150:130
AttrPalmSizeThreshold=1600

+[Apple Laptop Touchpad (MTP)]
+MatchUdevType=touchpad
+MatchName=Apple*MTP*
+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
--
2.38.1

20 changes: 10 additions & 10 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

pkgname=libinput
pkgver=1.22.0
pkgrel=1
pkgrel=1.2
pkgdesc="Input device management and event handling library"
url="https://gitlab.freedesktop.org/libinput"
arch=(aarch64)
Expand All @@ -14,18 +14,18 @@ optdepends=('gtk4: libinput debug-gui'
'python-pyudev: libinput measure'
'python-libevdev: libinput measure')
options=(debug)
source=(
https://gitlab.freedesktop.org/libinput/libinput/-/archive/$pkgver/$pkgname-$pkgver.tar.bz2
no-palm-exclusion-zones.patch
)
sha256sums=(
'b9204a860b4f6f9b2587c484f67a21fbdedd01a97db1f983b0b51cb7bdd428aa'
'd38aa046d680677e55a05f92d9f77b66152a4fed3e42bf10f38cd11447205d7b'
)
source=(https://gitlab.freedesktop.org/libinput/libinput/-/archive/$pkgver/$pkgname-$pkgver.tar.bz2
0001-quirks-Add-Apple-MTP-touchpad-quirk.patch
no-palm-exclusion-zones.patch)
sha256sums=('b9204a860b4f6f9b2587c484f67a21fbdedd01a97db1f983b0b51cb7bdd428aa'
'c021958e9fab4dab2572311b56eabdc14088af077978e9023a9ca9bbe8b2b90a'
'd38aa046d680677e55a05f92d9f77b66152a4fed3e42bf10f38cd11447205d7b')
#validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer (Who-T) <office@who-t.net>

build() {
(cd libinput-1.21.0 && patch -p1 -i ../no-palm-exclusion-zones.patch)
( cd $pkgname-$pkgver && patch -p1 -i ../0001-quirks-Add-Apple-MTP-touchpad-quirk.patch )
( cd $pkgname-$pkgver && patch -p1 -i ../no-palm-exclusion-zones.patch )

arch-meson $pkgname-$pkgver build \
-D udev-dir=/usr/lib/udev \
-D documentation=false
Expand Down

0 comments on commit 124e6a8

Please sign in to comment.