Skip to content

Commit

Permalink
Update to libwacom-2.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
qzed committed Jun 9, 2024
1 parent 8357a6c commit f083fac
Show file tree
Hide file tree
Showing 18 changed files with 129 additions and 100 deletions.
37 changes: 25 additions & 12 deletions patches/v2/0001-Add-support-for-BUS_VIRTUAL.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 2d6eb3775056be6c00993aa55eac79cac7678d6d Mon Sep 17 00:00:00 2001
From 90a64d7efe111a10b623e179b040bdf5c5e1d406 Mon Sep 17 00:00:00 2001
From: Dorian Stoll <[email protected]>
Date: Sat, 27 Jun 2020 18:21:11 +0200
Subject: [PATCH 01/16] Add support for BUS_VIRTUAL
Expand All @@ -17,10 +17,11 @@ Signed-off-by: Dorian Stoll <[email protected]>
libwacom/libwacom.h | 1 +
test/test-tablet-validity.c | 1 +
test/test_data_files.py | 1 +
5 files changed, 12 insertions(+)
tools/debug-device.c | 1 +
6 files changed, 13 insertions(+)

diff --git a/libwacom/libwacom-database.c b/libwacom/libwacom-database.c
index 2c17e0d..090d5aa 100644
index 0dfb5f0..0f1b180 100644
--- a/libwacom/libwacom-database.c
+++ b/libwacom/libwacom-database.c
@@ -130,6 +130,8 @@ bus_from_str (const char *str)
Expand All @@ -42,10 +43,10 @@ index 2c17e0d..090d5aa 100644
g_assert_not_reached ();
}
diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c
index c606e48..2f6bddd 100644
index 349608d..b6d1f4c 100644
--- a/libwacom/libwacom.c
+++ b/libwacom/libwacom.c
@@ -148,6 +148,10 @@ get_bus_vid_pid (GUdevDevice *device,
@@ -149,6 +149,10 @@ get_bus_vid_pid (GUdevDevice *device,
*bus = WBUSTYPE_I2C;
retval = TRUE;
break;
Expand All @@ -56,7 +57,7 @@ index c606e48..2f6bddd 100644
}

out:
@@ -826,6 +830,7 @@ static void print_match(int fd, const WacomMatch *match)
@@ -1022,6 +1026,7 @@ static void print_match(int fd, const WacomMatch *match)
case WBUSTYPE_USB: bus_name = "usb"; break;
case WBUSTYPE_SERIAL: bus_name = "serial"; break;
case WBUSTYPE_I2C: bus_name = "i2c"; break;
Expand All @@ -65,10 +66,10 @@ index c606e48..2f6bddd 100644
default: g_assert_not_reached(); break;
}
diff --git a/libwacom/libwacom.h b/libwacom/libwacom.h
index 389681d..040c51e 100644
index c0d380c..a4fbb17 100644
--- a/libwacom/libwacom.h
+++ b/libwacom/libwacom.h
@@ -149,6 +149,7 @@ typedef enum {
@@ -154,6 +154,7 @@ typedef enum {
WBUSTYPE_SERIAL, /**< Serial tablet */
WBUSTYPE_BLUETOOTH, /**< Bluetooth tablet */
WBUSTYPE_I2C, /**< I2C tablet */
Expand All @@ -77,7 +78,7 @@ index 389681d..040c51e 100644

/**
diff --git a/test/test-tablet-validity.c b/test/test-tablet-validity.c
index 4b7983d..91e83de 100644
index 69d34c8..964fce0 100644
--- a/test/test-tablet-validity.c
+++ b/test/test-tablet-validity.c
@@ -177,6 +177,7 @@ assert_vidpid(WacomBusType bus, int vid, int pid)
Expand All @@ -89,17 +90,29 @@ index 4b7983d..91e83de 100644
g_assert_cmpint(pid, >, 0);
break;
diff --git a/test/test_data_files.py b/test/test_data_files.py
index 4cca787..8ab1fea 100755
index 9385b1c..f76c3f3 100755
--- a/test/test_data_files.py
+++ b/test/test_data_files.py
@@ -46,6 +46,7 @@ def test_device_match(tabletfile):
@@ -47,6 +47,7 @@ def test_device_match(tabletfile):
"bluetooth",
"i2c",
"serial",
+ "virt",
], f"{tabletfile}: unknown bus type"
assert re.match(
"[0-9a-f]{4}", vid
diff --git a/tools/debug-device.c b/tools/debug-device.c
index 2cdac20..51ec53e 100644
--- a/tools/debug-device.c
+++ b/tools/debug-device.c
@@ -122,6 +122,7 @@ handle_device(WacomDeviceDatabase *db, const char *path)
case WBUSTYPE_SERIAL: busstr = "SERIAL"; break;
case WBUSTYPE_BLUETOOTH: busstr = "BLUETOOTH"; break;
case WBUSTYPE_I2C: busstr = "I2C"; break;
+ case WBUSTYPE_VIRTUAL: busstr = "VIRTUAL"; break;
}
func(libwacom_get_bustype, "%s", busstr);
}
--
2.43.2
2.45.1

37 changes: 25 additions & 12 deletions patches/v2/0002-Add-support-for-Intel-Management-Engine-bus.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 4348064ccdd80d1ded743bf63369116ccb165add Mon Sep 17 00:00:00 2001
From b977a08585515b82d225e1b811dc74c1640f842b Mon Sep 17 00:00:00 2001
From: Maximilian Luz <[email protected]>
Date: Sat, 1 Jun 2019 21:17:15 +0200
Subject: [PATCH 02/16] Add support for Intel Management Engine bus
Expand All @@ -12,10 +12,11 @@ the Microsoft Surface Books, Surface Pro 5 and 6, and Surface Laptops.
libwacom/libwacom.h | 1 +
test/test-tablet-validity.c | 1 +
test/test_data_files.py | 1 +
5 files changed, 12 insertions(+)
tools/debug-device.c | 1 +
6 files changed, 13 insertions(+)

diff --git a/libwacom/libwacom-database.c b/libwacom/libwacom-database.c
index 090d5aa..5a749c9 100644
index 0f1b180..c4c4afb 100644
--- a/libwacom/libwacom-database.c
+++ b/libwacom/libwacom-database.c
@@ -132,6 +132,8 @@ bus_from_str (const char *str)
Expand All @@ -37,10 +38,10 @@ index 090d5aa..5a749c9 100644
g_assert_not_reached ();
}
diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c
index 2f6bddd..c838c6d 100644
index b6d1f4c..fccdb5e 100644
--- a/libwacom/libwacom.c
+++ b/libwacom/libwacom.c
@@ -152,6 +152,10 @@ get_bus_vid_pid (GUdevDevice *device,
@@ -153,6 +153,10 @@ get_bus_vid_pid (GUdevDevice *device,
*bus = WBUSTYPE_VIRTUAL;
retval = TRUE;
break;
Expand All @@ -51,7 +52,7 @@ index 2f6bddd..c838c6d 100644
}

out:
@@ -831,6 +835,7 @@ static void print_match(int fd, const WacomMatch *match)
@@ -1027,6 +1031,7 @@ static void print_match(int fd, const WacomMatch *match)
case WBUSTYPE_SERIAL: bus_name = "serial"; break;
case WBUSTYPE_I2C: bus_name = "i2c"; break;
case WBUSTYPE_VIRTUAL: bus_name = "virt"; break;
Expand All @@ -60,10 +61,10 @@ index 2f6bddd..c838c6d 100644
default: g_assert_not_reached(); break;
}
diff --git a/libwacom/libwacom.h b/libwacom/libwacom.h
index 040c51e..a937c08 100644
index a4fbb17..dfc6d7b 100644
--- a/libwacom/libwacom.h
+++ b/libwacom/libwacom.h
@@ -150,6 +150,7 @@ typedef enum {
@@ -155,6 +155,7 @@ typedef enum {
WBUSTYPE_BLUETOOTH, /**< Bluetooth tablet */
WBUSTYPE_I2C, /**< I2C tablet */
WBUSTYPE_VIRTUAL, /**< Virtual (uinput) tablet */
Expand All @@ -72,7 +73,7 @@ index 040c51e..a937c08 100644

/**
diff --git a/test/test-tablet-validity.c b/test/test-tablet-validity.c
index 91e83de..9c8af44 100644
index 964fce0..5178583 100644
--- a/test/test-tablet-validity.c
+++ b/test/test-tablet-validity.c
@@ -178,6 +178,7 @@ assert_vidpid(WacomBusType bus, int vid, int pid)
Expand All @@ -84,17 +85,29 @@ index 91e83de..9c8af44 100644
g_assert_cmpint(pid, >, 0);
break;
diff --git a/test/test_data_files.py b/test/test_data_files.py
index 8ab1fea..a3f1d9d 100755
index f76c3f3..f7cf9bc 100755
--- a/test/test_data_files.py
+++ b/test/test_data_files.py
@@ -47,6 +47,7 @@ def test_device_match(tabletfile):
@@ -48,6 +48,7 @@ def test_device_match(tabletfile):
"i2c",
"serial",
"virt",
+ "mei",
], f"{tabletfile}: unknown bus type"
assert re.match(
"[0-9a-f]{4}", vid
diff --git a/tools/debug-device.c b/tools/debug-device.c
index 51ec53e..6a00f9d 100644
--- a/tools/debug-device.c
+++ b/tools/debug-device.c
@@ -123,6 +123,7 @@ handle_device(WacomDeviceDatabase *db, const char *path)
case WBUSTYPE_BLUETOOTH: busstr = "BLUETOOTH"; break;
case WBUSTYPE_I2C: busstr = "I2C"; break;
case WBUSTYPE_VIRTUAL: busstr = "VIRTUAL"; break;
+ case WBUSTYPE_MEI: busstr = "MEI"; break;
}
func(libwacom_get_bustype, "%s", busstr);
}
--
2.43.2
2.45.1

8 changes: 4 additions & 4 deletions patches/v2/0003-data-Add-Microsoft-Surface-Pro-3.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 0a1d7af22cf6669f54a17c4c1f22578e46e37a3f Mon Sep 17 00:00:00 2001
From 64376efb36d8dbe5e383883e768c9c4a5e8b1d65 Mon Sep 17 00:00:00 2001
From: "Antony Jordan (Tablet)" <[email protected]>
Date: Wed, 8 Jun 2022 22:03:33 +0200
Subject: [PATCH 03/16] data: Add Microsoft Surface Pro 3
Expand All @@ -10,7 +10,7 @@ Subject: [PATCH 03/16] data: Add Microsoft Surface Pro 3

diff --git a/data/surface-pro3.tablet b/data/surface-pro3.tablet
new file mode 100644
index 0000000..3238d43
index 0000000..2f53541
--- /dev/null
+++ b/data/surface-pro3.tablet
@@ -0,0 +1,14 @@
Expand All @@ -19,7 +19,7 @@ index 0000000..3238d43
+[Device]
+Name=Microsoft Surface Pro 3
+Class=PenDisplay
+DeviceMatch=i2c:1b96:1b05
+DeviceMatch=i2c|1b96|1b05
+Width=10
+Height=6
+IntegratedIn=Display;System;
Expand All @@ -29,5 +29,5 @@ index 0000000..3238d43
+Touch=true
+Buttons=0
--
2.43.2
2.45.1

8 changes: 4 additions & 4 deletions patches/v2/0004-data-Add-Microsoft-Surface-Pro-4.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From ddd387ca3f2bdc1b468243224cb2aa87193fef64 Mon Sep 17 00:00:00 2001
From 69d4b09160d7a459c03ed86237bb0b6c40af75b9 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <[email protected]>
Date: Tue, 18 Aug 2020 20:18:55 +0200
Subject: [PATCH 04/16] data: Add Microsoft Surface Pro 4
Expand All @@ -10,7 +10,7 @@ Subject: [PATCH 04/16] data: Add Microsoft Surface Pro 4

diff --git a/data/surface-pro4.tablet b/data/surface-pro4.tablet
new file mode 100644
index 0000000..1e0c67c
index 0000000..f77f3a2
--- /dev/null
+++ b/data/surface-pro4.tablet
@@ -0,0 +1,14 @@
Expand All @@ -19,7 +19,7 @@ index 0000000..1e0c67c
+[Device]
+Name=Microsoft Surface Pro 4
+Class=PenDisplay
+DeviceMatch=virt:1b96:006a;virt:1b96:0021;mei:1b96:006a;mei:1b96:0021
+DeviceMatch=virt|1b96|006a;virt|1b96|0021;mei|1b96|006a;mei|1b96|0021
+Width=10
+Height=6
+IntegratedIn=Display;System;
Expand All @@ -29,5 +29,5 @@ index 0000000..1e0c67c
+Touch=true
+Buttons=0
--
2.43.2
2.45.1

8 changes: 4 additions & 4 deletions patches/v2/0005-data-Add-Microsoft-Surface-Pro-5.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 8ce0dca3d800e16527f50b8d67d4aefc728f1a4e Mon Sep 17 00:00:00 2001
From 751c24fe083f656b853adf46f809dacf1e6ddece Mon Sep 17 00:00:00 2001
From: Maximilian Luz <[email protected]>
Date: Tue, 18 Aug 2020 20:19:02 +0200
Subject: [PATCH 05/16] data: Add Microsoft Surface Pro 5
Expand All @@ -10,7 +10,7 @@ Subject: [PATCH 05/16] data: Add Microsoft Surface Pro 5

diff --git a/data/surface-pro5.tablet b/data/surface-pro5.tablet
new file mode 100644
index 0000000..b26af3a
index 0000000..410a0d3
--- /dev/null
+++ b/data/surface-pro5.tablet
@@ -0,0 +1,14 @@
Expand All @@ -19,7 +19,7 @@ index 0000000..b26af3a
+[Device]
+Name=Microsoft Surface Pro 5
+Class=PenDisplay
+DeviceMatch=virt:1b96:001f;mei:1b96:001f
+DeviceMatch=virt|1b96|001f;mei|1b96|001f
+Width=10
+Height=6
+IntegratedIn=Display;System;
Expand All @@ -29,5 +29,5 @@ index 0000000..b26af3a
+Touch=true
+Buttons=0
--
2.43.2
2.45.1

8 changes: 4 additions & 4 deletions patches/v2/0006-data-Add-Microsoft-Surface-Pro-6.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 2befbc9238f317037db002a2739055ff4fd5ad66 Mon Sep 17 00:00:00 2001
From 1a37e3b1355c83b651f864b7765c4b084a31dcdd Mon Sep 17 00:00:00 2001
From: Maximilian Luz <[email protected]>
Date: Tue, 18 Aug 2020 20:19:07 +0200
Subject: [PATCH 06/16] data: Add Microsoft Surface Pro 6
Expand All @@ -10,7 +10,7 @@ Subject: [PATCH 06/16] data: Add Microsoft Surface Pro 6

diff --git a/data/surface-pro6.tablet b/data/surface-pro6.tablet
new file mode 100644
index 0000000..e97fad8
index 0000000..eb89df0
--- /dev/null
+++ b/data/surface-pro6.tablet
@@ -0,0 +1,14 @@
Expand All @@ -19,7 +19,7 @@ index 0000000..e97fad8
+[Device]
+Name=Microsoft Surface Pro 6
+Class=PenDisplay
+DeviceMatch=virt:045e:001f;mei:045e:001f
+DeviceMatch=virt|045e|001f;mei|045e|001f
+Width=10
+Height=6
+IntegratedIn=Display;System;
Expand All @@ -29,5 +29,5 @@ index 0000000..e97fad8
+Touch=true
+Buttons=0
--
2.43.2
2.45.1

8 changes: 4 additions & 4 deletions patches/v2/0007-data-Add-Microsoft-Surface-Pro-7.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 8706ad3569c54a99996e05dedd60d2c3c0ca5bd7 Mon Sep 17 00:00:00 2001
From 7cb8964f880a129a514fd6eea4a84b6aa1051c05 Mon Sep 17 00:00:00 2001
From: Maximilian Luz <[email protected]>
Date: Tue, 18 Aug 2020 20:19:13 +0200
Subject: [PATCH 07/16] data: Add Microsoft Surface Pro 7
Expand All @@ -10,7 +10,7 @@ Subject: [PATCH 07/16] data: Add Microsoft Surface Pro 7

diff --git a/data/surface-pro7.tablet b/data/surface-pro7.tablet
new file mode 100644
index 0000000..7961379
index 0000000..f960107
--- /dev/null
+++ b/data/surface-pro7.tablet
@@ -0,0 +1,14 @@
Expand All @@ -19,7 +19,7 @@ index 0000000..7961379
+[Device]
+Name=Microsoft Surface Pro 7
+Class=PenDisplay
+DeviceMatch=virt:045e:099f;mei:045e:099f
+DeviceMatch=virt|045e|099f;mei|045e|099f
+Width=10
+Height=6
+IntegratedIn=Display;System;
Expand All @@ -29,5 +29,5 @@ index 0000000..7961379
+Touch=true
+Buttons=0
--
2.43.2
2.45.1

8 changes: 4 additions & 4 deletions patches/v2/0008-data-Add-Microsoft-Surface-Pro-7.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From ffa37875474a83c5adc0edf84626531cdefd4fa8 Mon Sep 17 00:00:00 2001
From 608d8072314c2aaf6ca341d5e824bb10465d9bfd Mon Sep 17 00:00:00 2001
From: Maximilian Luz <[email protected]>
Date: Fri, 26 May 2023 12:32:21 +0200
Subject: [PATCH 08/16] data: Add Microsoft Surface Pro 7+
Expand All @@ -11,7 +11,7 @@ Based on https://github.com/linux-surface/libwacom-surface/issues/12

diff --git a/data/surface-pro7-plus.tablet b/data/surface-pro7-plus.tablet
new file mode 100644
index 0000000..36e1e3f
index 0000000..5c4e540
--- /dev/null
+++ b/data/surface-pro7-plus.tablet
@@ -0,0 +1,14 @@
Expand All @@ -20,7 +20,7 @@ index 0000000..36e1e3f
+[Device]
+Name=Microsoft Surface Pro 7+
+Class=PenDisplay
+DeviceMatch=virt:045e:0c1a
+DeviceMatch=virt|045e|0c1a
+Width=10
+Height=6
+IntegratedIn=Display;System;
Expand All @@ -30,5 +30,5 @@ index 0000000..36e1e3f
+Touch=true
+Buttons=0
--
2.43.2
2.45.1

Loading

0 comments on commit f083fac

Please sign in to comment.