It seems I just need to import a couple of files from OpenBSD: sys/dev/i2c/imt.c, sys/dev/hid/hidmt.c and sys/dev/hid/hidmtvar.h.
I've found I needed to add the following lines to my kernel config to get imt.c to compile:
imt* at ihidev? reportid ?
wsmouse* at imt? mux 0
but I haven't yet found how to do the same for sys/dev/hid/hidmt.c. I've tried to find lines for hidms.c to get some inspiration but haven't found any.
Also, I've added the new sources to the
files.<srcDirName> files in the dev/hid/ and dev/i2c/ source directories but I don't know if it's of any use.
I'd be happy if someone could clarify these points for me so I can get hidmt.c to compile.
EDIT: Ooops! It appears copying the file is enough. Too many file manager windows open...