1- From 4348064ccdd80d1ded743bf63369116ccb165add Mon Sep 17 00:00:00 2001
1+ From b977a08585515b82d225e1b811dc74c1640f842b Mon Sep 17 00:00:00 2001
22From: Maximilian Luz <
[email protected] >
33Date: Sat, 1 Jun 2019 21:17:15 +0200
44Subject: [PATCH 02/16] Add support for Intel Management Engine bus
@@ -12,10 +12,11 @@ the Microsoft Surface Books, Surface Pro 5 and 6, and Surface Laptops.
1212 libwacom/libwacom.h | 1 +
1313 test/test-tablet-validity.c | 1 +
1414 test/test_data_files.py | 1 +
15- 5 files changed, 12 insertions(+)
15+ tools/debug-device.c | 1 +
16+ 6 files changed, 13 insertions(+)
1617
1718diff --git a/libwacom/libwacom-database.c b/libwacom/libwacom-database.c
18- index 090d5aa..5a749c9 100644
19+ index 0f1b180..c4c4afb 100644
1920--- a/libwacom/libwacom-database.c
2021+++ b/libwacom/libwacom-database.c
2122@@ -132,6 +132,8 @@ bus_from_str (const char *str)
@@ -37,10 +38,10 @@ index 090d5aa..5a749c9 100644
3738 g_assert_not_reached ();
3839 }
3940diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c
40- index 2f6bddd..c838c6d 100644
41+ index b6d1f4c..fccdb5e 100644
4142--- a/libwacom/libwacom.c
4243+++ b/libwacom/libwacom.c
43- @@ -152 ,6 +152 ,10 @@ get_bus_vid_pid (GUdevDevice *device,
44+ @@ -153 ,6 +153 ,10 @@ get_bus_vid_pid (GUdevDevice *device,
4445 *bus = WBUSTYPE_VIRTUAL;
4546 retval = TRUE;
4647 break;
@@ -51,7 +52,7 @@ index 2f6bddd..c838c6d 100644
5152 }
5253
5354 out:
54- @@ -831 ,6 +835 ,7 @@ static void print_match(int fd, const WacomMatch *match)
55+ @@ -1027 ,6 +1031 ,7 @@ static void print_match(int fd, const WacomMatch *match)
5556 case WBUSTYPE_SERIAL: bus_name = "serial"; break;
5657 case WBUSTYPE_I2C: bus_name = "i2c"; break;
5758 case WBUSTYPE_VIRTUAL: bus_name = "virt"; break;
@@ -60,10 +61,10 @@ index 2f6bddd..c838c6d 100644
6061 default: g_assert_not_reached(); break;
6162 }
6263diff --git a/libwacom/libwacom.h b/libwacom/libwacom.h
63- index 040c51e..a937c08 100644
64+ index a4fbb17..dfc6d7b 100644
6465--- a/libwacom/libwacom.h
6566+++ b/libwacom/libwacom.h
66- @@ -150 ,6 +150 ,7 @@ typedef enum {
67+ @@ -155 ,6 +155 ,7 @@ typedef enum {
6768 WBUSTYPE_BLUETOOTH, /**< Bluetooth tablet */
6869 WBUSTYPE_I2C, /**< I2C tablet */
6970 WBUSTYPE_VIRTUAL, /**< Virtual (uinput) tablet */
@@ -72,7 +73,7 @@ index 040c51e..a937c08 100644
7273
7374 /**
7475diff --git a/test/test-tablet-validity.c b/test/test-tablet-validity.c
75- index 91e83de..9c8af44 100644
76+ index 964fce0..5178583 100644
7677--- a/test/test-tablet-validity.c
7778+++ b/test/test-tablet-validity.c
7879@@ -178,6 +178,7 @@ assert_vidpid(WacomBusType bus, int vid, int pid)
@@ -84,17 +85,29 @@ index 91e83de..9c8af44 100644
8485 g_assert_cmpint(pid, >, 0);
8586 break;
8687diff --git a/test/test_data_files.py b/test/test_data_files.py
87- index 8ab1fea..a3f1d9d 100755
88+ index f76c3f3..f7cf9bc 100755
8889--- a/test/test_data_files.py
8990+++ b/test/test_data_files.py
90- @@ -47 ,6 +47 ,7 @@ def test_device_match(tabletfile):
91+ @@ -48 ,6 +48 ,7 @@ def test_device_match(tabletfile):
9192 "i2c",
9293 "serial",
9394 "virt",
9495+ "mei",
9596 ], f"{tabletfile}: unknown bus type"
9697 assert re.match(
9798 "[0-9a-f]{4}", vid
99+ diff --git a/tools/debug-device.c b/tools/debug-device.c
100+ index 51ec53e..6a00f9d 100644
101+ --- a/tools/debug-device.c
102+ +++ b/tools/debug-device.c
103+ @@ -123,6 +123,7 @@ handle_device(WacomDeviceDatabase *db, const char *path)
104+ case WBUSTYPE_BLUETOOTH: busstr = "BLUETOOTH"; break;
105+ case WBUSTYPE_I2C: busstr = "I2C"; break;
106+ case WBUSTYPE_VIRTUAL: busstr = "VIRTUAL"; break;
107+ + case WBUSTYPE_MEI: busstr = "MEI"; break;
108+ }
109+ func(libwacom_get_bustype, "%s", busstr);
110+ }
98111- -
99- 2.43.2
112+ 2.45.1
100113
0 commit comments