This is a cache of https://discuss.96boards.org/t/can-i-get-help-with-hid-over-i2c/10315. It is a snapshot of the page at 2024-09-19T01:55:26.991+0000.
Can I get help with HID over <strong>i2c</strong>? - MediaTek-X20 - 96Boards Forum

Can I get help with HID over i2c?

I made a development environment by connecting the Touch Input device to the x20 board through i2c.
The purpose is to activate HID over i2c and receive touch coordinates through HID descriptor.

I looked at the “HID Over i2c Protocol Specification.docx” document provided by microsoft and the documents related to x20, but since I am a beginner, I am not sure what to start with.

Can anyone please help me on how to approach it for beginners?

This is what you are looking for;
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/hid/i2c-hid?h=v5.8

You need to add the driver to your kernel build using CONFIG_i2c_HID=y
And you will need to add a node to your devicetree by following the instructions;
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/input/hid-over-i2c.txt?h=v5.8

Thanks for the help. It feels like the fog is clearing.

I will try based on the method you suggested.

And, I have one more question.
The kernel I am using is v3.18, but does hid over i2c not work in the old version?

If the driver is present in the source, should be fine.