linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Zaidman <michael.zaidman@gmail.com>
To: jikos@kernel.org, benjamin.tissoires@redhat.com, wsa@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
	linux-i2c@vger.kernel.org,
	Michael Zaidman <michael.zaidman@gmail.com>
Subject: [PATCH v2 0/1] HID: ft260: add usb hid to i2c host bridge driver
Date: Fri, 19 Feb 2021 18:36:43 +0200	[thread overview]
Message-ID: <20210219163644.2811-1-michael.zaidman@gmail.com> (raw)

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


             reply	other threads:[~2021-02-19 16:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19 16:36 Michael Zaidman [this message]
2021-02-19 16:36 ` [PATCH v2 1/1] HID: ft260: add usb hid to i2c host bridge driver Michael Zaidman
2021-03-04 11:14   ` [PATCHv2 " Aaron Jones
2021-03-04 12:46     ` Michael Zaidman
2021-03-16  7:25       ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210219163644.2811-1-michael.zaidman@gmail.com \
    --to=michael.zaidman@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wsa@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).