Support for Human Interface Devices over I2C.
There are a couple of points to keep in mind:
- Currently iichid only supports mouse devices and therefore creates /dev/ims*.
- I use moused with settings in rc.conf like this: moused_port="/dev/ims0"
- I tried a few approaches to identify and attach an iichid device by querying ACPI directly from the iichid module. That failed on two details: parent association (in general HID over I2C devices appear below ACPI0 in NewBus but it is necessary to have them below the iicbus*/iic* nodes, moving these node in NewBus failed for me with a panic) and also interrupt handling (apparently, interrupts must be handled by the nodes the IRQs are assigned to (i.e. the node below ACPI0). Trying to attach to an IRQ from another node (i.e. a node below iicbus*/i2c*) fails)
- acpi_iichid creates a iichid node below the identifiable iicbus
- acpi_iichid enques a task either on interrupt or timeout and delegates retrieval of reports to iichid by callback
- iichid_load="YES" and acpi_iichid_load="YES" in loader.conf should work now without crash.
- Please refer to the changes I made to usbhid.h and usbhid.c, since I moved the generic hid functionality out of those files into two new ones. The long term aim would be to create a HID abstraction layer (called HID Caps) that will provide a general interface to HID capabilities and functions through the device tree. It will help to make it easier to use Human Interface Devices on different busses without the need of pulling USB into the kernel configuration. This is work in progress and, for now, independent of the I2C over HID support.