summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg V <greg@unrelenting.technology>2021-03-16 01:02:54 +0300
committerPeter Hutterer <peter.hutterer@who-t.net>2021-03-17 02:34:30 +0000
commit5f00c32d9ec8878948696f7c89ffb8b29a591fb6 (patch)
tree1b3ada403f292a3330aa91bb799adbc925a1d2a0
parent83b3670c9a75046928fe15d5ecfbe7cdec8ef52c (diff)
downloadlibinput-5f00c32d9ec8878948696f7c89ffb8b29a591fb6.tar.gz
quirks: recognize SPI bus
Apple MacBooks (Broadwell/Skylake/Kaby Lake and Apple Silicon) use SPI to communicate with the keyboard and trackpad. Signed-off-by: Greg V <greg@unrelenting.technology>
-rw-r--r--src/quirks.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quirks.c b/src/quirks.c
index 9d90389a..26131a81 100644
--- a/src/quirks.c
+++ b/src/quirks.c
@@ -111,6 +111,7 @@ enum bustype {
BT_PS2,
BT_RMI,
BT_I2C,
+ BT_SPI,
};
enum udev_type {
@@ -499,6 +500,8 @@ parse_match(struct quirks_context *ctx,
s->match.bus = BT_RMI;
else if (streq(value, "i2c"))
s->match.bus = BT_I2C;
+ else if (streq(value, "spi"))
+ s->match.bus = BT_SPI;
else
goto out;
} else if (streq(key, "MatchVendor")) {
@@ -1241,6 +1244,10 @@ match_fill_bus_vid_pid(struct match *m,
m->bus = BT_I2C;
m->bits |= M_BUS;
break;
+ case BUS_SPI:
+ m->bus = BT_SPI;
+ m->bits |= M_BUS;
+ break;
default:
break;
}