summarylogtreecommitdiffstats
path: root/00_mei-bus.patch
blob: ecb5ab6fd8e5e24592fe737c22e5826e1521f4c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
diff --git a/libwacom/libwacom-database.c b/libwacom/libwacom-database.c
index 1da9adf..e121c88 100644
--- a/libwacom/libwacom-database.c
+++ b/libwacom/libwacom-database.c
@@ -112,6 +112,8 @@ bus_from_str (const char *str)
 		return WBUSTYPE_BLUETOOTH;
 	if (strcmp (str, "i2c") == 0)
 		return WBUSTYPE_I2C;
+	if (strcmp (str, "mei") == 0)
+		return WBUSTYPE_MEI;
 	return WBUSTYPE_UNKNOWN;
 }
 
@@ -130,6 +132,8 @@ bus_to_str (WacomBusType bus)
 		return "bluetooth";
 	case WBUSTYPE_I2C:
 		return "i2c";
+	case WBUSTYPE_MEI:
+		return "mei";
 	}
 	g_assert_not_reached ();
 }
diff --git a/libwacom/libwacom.c b/libwacom/libwacom.c
index 8979a53..c09e07d 100644
--- a/libwacom/libwacom.c
+++ b/libwacom/libwacom.c
@@ -144,6 +144,10 @@ get_bus_vid_pid (GUdevDevice  *device,
 		*bus = WBUSTYPE_I2C;
 		retval = TRUE;
 		break;
+	case 68:
+		*bus = WBUSTYPE_MEI;
+		retval = TRUE;
+		break;
 	}
 
 out:
@@ -736,6 +740,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;
+		case WBUSTYPE_MEI:		bus_name = "mei";	break;
 		case WBUSTYPE_UNKNOWN:		bus_name = "unknown";	break;
 		default:			g_assert_not_reached(); break;
 	}
diff --git a/libwacom/libwacom.h b/libwacom/libwacom.h
index bb968e7..24ab9f3 100644
--- a/libwacom/libwacom.h
+++ b/libwacom/libwacom.h
@@ -116,6 +116,7 @@ typedef enum {
 	WBUSTYPE_SERIAL,	/**< Serial tablet */
 	WBUSTYPE_BLUETOOTH,	/**< Bluetooth tablet */
 	WBUSTYPE_I2C,		/**< I2C tablet */
+	WBUSTYPE_MEI,		/**< MEI */
 } WacomBusType;
 
 /**