1- From 02df4e0f272dff001ee280ab93e8e1c4600375ff Mon Sep 17 00:00:00 2001
1+ From 08eb08f64150fd93b178069d1109116cf90720de Mon Sep 17 00:00:00 2001
22From: Maximilian Luz <
[email protected] >
33Date: Sat, 1 Jun 2019 21:17:15 +0200
44Subject: [PATCH 02/11] Add support for Intel Management Engine bus
@@ -15,31 +15,32 @@ the Microsoft Surface Books, Surface Pro 5 and 6, and Surface Laptops.
1515 5 files changed, 12 insertions(+), 1 deletion(-)
1616
1717diff --git a/data/test_data_files.py b/data/test_data_files.py
18- index cb5ca6d..466b18a 100755
18+ index 26d274f..bc92658 100755
1919--- a/data/test_data_files.py
2020+++ b/data/test_data_files.py
21- @@ -29,6 +29,6 @@ def test_device_match(tabletfile):
21+ @@ -34,7 +34,7 @@ def test_device_match(tabletfile):
2222 continue
2323
2424 bus, vid, pid = match.split(':')[:3] # skip the name part of the match
2525- assert bus in ['usb', 'bluetooth', 'i2c', 'serial', 'virt'], f'{tabletfile}: unknown bus type'
2626+ assert bus in ['usb', 'bluetooth', 'i2c', 'serial', 'virt', 'mei'], f'{tabletfile}: unknown bus type'
2727 assert re.match('[0-9a-f]{4}', vid), f'{tabletfile}: {vid} must be lowercase hex'
2828 assert re.match('[0-9a-f]{4}', pid), f'{tabletfile}: {pid} must be lowercase hex'
29+
2930diff --git a/libwacom/libwacom-database.c b/libwacom/libwacom-database.c
30- index 17571b6..4c6df4e 100644
31+ index 3c7d0de..28c0ac5 100644
3132--- a/libwacom/libwacom-database.c
3233+++ b/libwacom/libwacom-database.c
33- @@ -132 ,6 +132 ,8 @@ bus_from_str (const char *str)
34+ @@ -130 ,6 +130 ,8 @@ bus_from_str (const char *str)
3435 return WBUSTYPE_I2C;
35- if (streq (str, "virt"))
36+ if (g_str_equal (str, "virt"))
3637 return WBUSTYPE_VIRTUAL;
3738+ if (strcmp (str, "mei") == 0)
3839+ return WBUSTYPE_MEI;
3940 return WBUSTYPE_UNKNOWN;
4041 }
4142
42- @@ -152 ,6 +154 ,8 @@ bus_to_str (WacomBusType bus)
43+ @@ -150 ,6 +152 ,8 @@ bus_to_str (WacomBusType bus)
4344 return "i2c";
4445 case WBUSTYPE_VIRTUAL:
4546 return "virt";
@@ -49,10 +50,10 @@ index 17571b6..4c6df4e 100644
4950 g_assert_not_reached ();
5051 }
5152diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c
52- index 7b97bb1..d84e8fa 100644
53+ index 88d0777..09e289f 100644
5354--- a/libwacom/libwacom.c
5455+++ b/libwacom/libwacom.c
55- @@ -151 ,6 +151 ,10 @@ get_bus_vid_pid (GUdevDevice *device,
56+ @@ -153 ,6 +153 ,10 @@ get_bus_vid_pid (GUdevDevice *device,
5657 *bus = WBUSTYPE_VIRTUAL;
5758 retval = TRUE;
5859 break;
@@ -63,7 +64,7 @@ index 7b97bb1..d84e8fa 100644
6364 }
6465
6566 out:
66- @@ -770 ,6 +774 ,7 @@ static void print_match(int fd, const WacomMatch *match)
67+ @@ -802 ,6 +806 ,7 @@ static void print_match(int fd, const WacomMatch *match)
6768 case WBUSTYPE_SERIAL: bus_name = "serial"; break;
6869 case WBUSTYPE_I2C: bus_name = "i2c"; break;
6970 case WBUSTYPE_VIRTUAL: bus_name = "virt"; break;
@@ -84,10 +85,10 @@ index 24e99cd..0eee2fd 100644
8485
8586 /**
8687diff --git a/test/test-tablet-validity.c b/test/test-tablet-validity.c
87- index 3883341..352bc43 100644
88+ index da5fe07..6b45597 100644
8889--- a/test/test-tablet-validity.c
8990+++ b/test/test-tablet-validity.c
90- @@ -180 ,6 +180 ,7 @@ assert_vidpid(WacomBusType bus, int vid, int pid)
91+ @@ -178 ,6 +178 ,7 @@ assert_vidpid(WacomBusType bus, int vid, int pid)
9192 case WBUSTYPE_BLUETOOTH:
9293 case WBUSTYPE_I2C:
9394 case WBUSTYPE_VIRTUAL:
@@ -96,5 +97,5 @@ index 3883341..352bc43 100644
9697 g_assert_cmpint(pid, >, 0);
9798 break;
9899- -
99- 2.30 .1
100+ 2.31 .1
100101
0 commit comments