Skip to content

HID: ft260: add usb hid to i2c host bridge driver

Michael Zaidman linux-i2c linux-input lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest1 patch 3 repliesIn review
  2. v11 patch 0 repliesSuperseded

Changes in v2 from the cover letter

- Refined the cover letter content.
- Reduced number of debugging messages.
- Removed unused ft260_request_report structure.
- Relocated module build rule in the Makefile according to alphabetic order.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1HID: ft260: add usb hid to i2c host bridge driverMAINTAINERS drivers/hid/Kconfig drivers/hid/Makefile +2 more+1073 -03 replies

Reviews trailers per patch

The patch has no Reviewed-by or Acked-by.

PatchAaron Jones (FTDI-UK)
1/1T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/1] HID: ft260: add usb hid to i2c host bridge driver

The FTDI FT260 chip implements USB to I2C/UART bridges through two USB HID class interfaces [1]. The first - for I2C, and the second for UART. Each interface is independent, and the kernel detects it as a separate USB hidraw device.

There is no I2C master/host driver for this chip to date, and FTDI suggests using hidraw and libusb userspace libraries to operate the FT260 I2C host controller via hidraw Linux kernel driver. But this approach makes the standard Linux I2C tools useless, and it does not allow the I2C sysfs tree instantiation required by I2C multiplexers and switches.

This commit adds the I2C host adapter support, enabling a wide range of the standard userspace I2C tools and applications that do not implement HID protocol, accessing the I2C client devices via FT260 USB to I2C controller.

The driver was tested with various I2C client devices like PCA9548, PCAL6524, 24C0x, different QSFP-DD and OSFP transceivers, and Linux userspace I2C tools (i2cdetect, i2cdump, i2cget and i2cset).

HID commands and responses are FT260 specific and documented in the AN_394_User_Guide_for_FT260.pdf [2].

[1] - https://ftdichip.com/wp-content/uploads/2020/07/DS_FT260.pdf
[2] - https://www.ftdichip.com/Support/Documents/AppNotes/AN_394_User_Guide_for_FT260.pdf

Changes since v1:
- Refined the cover letter content.
- Reduced number of debugging messages.
- Removed unused ft260_request_report structure.
- Relocated module build rule in the Makefile according to alphabetic order.

Michael Zaidman (1):
HID: ft260: add usb hid to i2c host bridge driver

 MAINTAINERS             |    7 +
 drivers/hid/Kconfig     |   11 +
 drivers/hid/Makefile    |    1 +
 drivers/hid/hid-ft260.c | 1053 +++++++++++++++++++++++++++++++++++++++
 drivers/hid/hid-ids.h   |    1 +
 5 files changed, 1073 insertions(+)
 create mode 100644 drivers/hid/hid-ft260.c

base-commit: abaf6f60176f1ae9d946d63e4db63164600b7b1a

Signature · 1 line
2.25.1