Permalink
Browse files

Match on interfaces with Digitizers/Touchscreen collections, as long

as they have an X usage.

Should get basic touchscreen functionality on some common
HID-over-i2c devices like laptops.
  • Loading branch information...
jcs committed Sep 1, 2018
1 parent cecb02c commit f320308cc2368ecbbecc04b9caf0f74523c62ab0
Showing with 7 additions and 1 deletion.
  1. +7 −1 sys/dev/i2c/ims.c
@@ -1,4 +1,4 @@
/* $OpenBSD: ims.c,v 1.1 2016/01/12 01:11:15 jcs Exp $ */
/* $OpenBSD: ims.c,v 1.2 2018/09/01 20:50:16 jcs Exp $ */
/*
* HID-over-i2c mouse/trackpad driver
*
@@ -85,6 +85,12 @@ ims_match(struct device *parent, void *match, void *aux)
HID_USAGE2(HUP_DIGITIZERS, HUD_PEN)))
return (IMATCH_IFACECLASS);
if (hid_is_collection(desc, size, iha->reportid,
HID_USAGE2(HUP_DIGITIZERS, HUD_TOUCHSCREEN)) &&
hid_locate(desc, size, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_X),
iha->reportid, hid_input, NULL, NULL))
return (IMATCH_IFACECLASS);
return (IMATCH_NONE);
}

0 comments on commit f320308

Please sign in to comment.