linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/1] HID: ft260: add usb hid to i2c host bridge driver
@ 2021-02-19 16:36 Michael Zaidman
  2021-02-19 16:36 ` [PATCH v2 1/1] " Michael Zaidman
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Zaidman @ 2021-02-19 16:36 UTC (permalink / raw)
  To: jikos, benjamin.tissoires, wsa
  Cc: linux-kernel, linux-input, linux-i2c, Michael Zaidman

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
-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-16  7:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-19 16:36 [PATCH v2 0/1] HID: ft260: add usb hid to i2c host bridge driver Michael Zaidman
2021-02-19 16:36 ` [PATCH v2 1/1] " Michael Zaidman
2021-03-04 11:14   ` [PATCHv2 " Aaron Jones
2021-03-04 12:46     ` Michael Zaidman
2021-03-16  7:25       ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).