HID: ft260: add usb hid to i2c host bridge driver
Michael Zaidman
maintainercover HID: ft260: add usb hid to i2c host bridge driver
The FT260 is a USB device that implements USB to I2C/UART bridges through two USB HID class interfaces. The first - for I2C, and the second for UART. Each interface is independent, and the kernel detects it as a separate hidraw device.
This commit adds I2C host adapter support, enabling a wide range of standard userspace tools and applications that do not implement HID protocol, to access the I2C client devices via FT260 I2C controller.
The driver was tested with different I2C client devices, Linux kernels, and Linux userspace tools.
For data transfer, the FT260 implements one Interrupt IN and one Interrupt OUT pipes per interface. For configuration and control, the FT260 exposes the HID class commands through the Control pipe.
Commands and responses are FT260 specific and documented in the AN_394_User_Guide_for_FT260.pdf on the https://www.ftdichip.com.
Michael Zaidman (1):
HID: ft260: add usb hid to i2c host bridge driver
MAINTAINERS | 7 + drivers/hid/Kconfig | 11 + drivers/hid/Makefile | 2 + drivers/hid/hid-ft260.c | 1097 +++++++++++++++++++++++++++++++++++++++ drivers/hid/hid-ids.h | 1 + 5 files changed, 1118 insertions(+) create mode 100644 drivers/hid/hid-ft260.c
base-commit: 07f7e57c63aaa2afb4ea31edef05e08699a63a00
Signature · 1 line
2.25.1
Michael Zaidman
maintainerPATCH 1/1 HID: ft260: add usb hid to i2c host bridge driver
The FT260 is a USB device that implements USB to I2C/UART bridges through two USB HID class interfaces. The first - for I2C, and the second for UART. Each interface is independently controlled, and the kernel detects each interface as a separate hidraw device.
This commit adds I2C host adapter support.
--- MAINTAINERS | 7 + drivers/hid/Kconfig | 11 + drivers/hid/Makefile | 2 + drivers/hid/hid-ft260.c | 1097 +++++++++++++++++++++++++++++++++++++++ drivers/hid/hid-ids.h | 1 + 5 files changed, 1118 insertions(+) create mode 100644 drivers/hid/hid-ft260.c
MAINTAINERS +7 -0
@@ -7310,6 +7310,13 @@ F: fs/verity/ F: include/linux/fsverity.h F: include/uapi/linux/fsverity.h +FT260 FTDI USB-HID TO I2C BRIDGE DRIVER +M: Michael Zaidman <[email protected]> +L: [email protected] +L: [email protected] +S: Maintained +F: drivers/hid/hid-ft260.c + FUJITSU LAPTOP EXTRAS M: Jonathan Woithe <[email protected]> L: [email protected]
drivers/hid/Kconfig +11 -0
@@ -351,6 +351,17 @@ config HID_EZKEY help Support for Ezkey BTC 8193 keyboard. +config HID_FT260 + tristate "FTDI FT260 USB HID to I2C host support" + depends on USB_HID && HIDRAW && I2C + help + Provides I2C host adapter functionality over USB-HID through FT260 + device. The customizable USB descriptor fields are exposed as sysfs + attributes. + + To compile this driver as a module, choose M here: the module + will be called hid-ft260. + config HID_GEMBIRD tristate "Gembird Joypad" depends on HID
drivers/hid/Makefile +2 -0
@@ -145,3 +145,5 @@ obj-$(CONFIG_INTEL_ISH_HID) += intel-ish-hid/ obj-$(INTEL_ISH_FIRMWARE_DOWNLOADER) += intel-ish-hid/ obj-$(CONFIG_AMD_SFH_HID) += amd-sfh-hid/ + +obj-$(CONFIG_HID_FT260) += hid-ft260.o
drivers/hid/hid-ft260.c new file +1097 -0
1,097 lines not on this page · raw message
drivers/hid/hid-ids.h +1 -0
@@ -430,6 +430,7 @@#define USB_VENDOR_ID_FUTURE_TECHNOLOGY 0x0403#define USB_DEVICE_ID_RETRODE2 0x97c1 +#define USB_DEVICE_ID_FT260 0x6030#define USB_VENDOR_ID_ESSENTIAL_REALITY 0x0d7f#define USB_DEVICE_ID_ESSENTIAL_REALITY_P5 0x0100
Signature · 1 line
2.25.1