Using new driver API

The driver for i2c tablets/touchpads is work in progress here: https://review.haiku-os.org/c/haiku/+/2466

As you can see in this version, the whole HID parser was copied from the USB driver. It should instead be refactored, maybe the USB and I2C drivers should expose an HID bus and then a generic HID driver would handle devices on that bus. Or maybe we can keep the drivers as they are now, and just make the HID code a separate kernel module loaded by them. But in any case, we would prefer to not copypaste the same code in two drivers. At a bare minimum it could be made into a static lib for both drivers to link into, I guess?

Help welcome refactoring this!

1 Like