The MT2 uses a compact report format, but otherwise is similar in many ways to the internal trackpads, it even uses the same mode switching commands. (With an extra byte via bluetooth for some reason :/ but exactly the same via USB) I'm not sure if handling it in the same driver is the correct way to go, but it was easy to add here.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/dev/hid/bcm5974.c | ||
---|---|---|
192 | AFAIK bitfields are not endian-safe. Replace this block with single uint32_t and use shifts with bitmasks | |
199 | ditto | |
380 | Size member should be 0 for pressure | |
781 | No need to set EVDEV_FLAG_MT_TRACK flag while initializing evdev if device already exports good tracking id | |
788 | Just do not declare ABS_MT_WIDTH_MAJOR/ABS_MT_WIDTH_MAJOR events during initialization instead of setting them to 0 here. |
Endian convert the initial 32 bit field, use given IDs, do not report width major/minor
sys/dev/hid/bcm5974.c | ||
---|---|---|
199 |
On BE archs not bytes are stored in opposite order as compared to LE, but structure members. See e.g. https://github.com/freebsd/freebsd-src/blob/main/sys/dev/usb/usbdi.h#L273 . So shifts/masks should be used here too. Alternatively, usbdi.h trick with reversing of member order can be used. It looks better than shifts/masks but just now I have no access BE arch to test it especially for members which crosses byte boundaries. |