HID: New hid-cp2112 driver.
PATCH 1/1 HID: New hid-cp2112 driver.
From: David Barksdale <[email protected]>
This patch adds support for the Silicon Labs CP2112 "Single-Chip HID USB to SMBus Master Bridge."
I wrote this to support a USB temperature and humidity sensor I've been working on. It's been tested by using SMBus byte-read, byte-data-read/write, and byte-word-read transfer modes to talk to an I2C sensor. The other transfer modes have not been tested.
Signed-off-by David Barksdale <[email protected]>
--- drivers/hid/Kconfig | 6 + drivers/hid/Makefile | 1 + drivers/hid/hid-core.c | 3 + drivers/hid/hid-cp2112.c | 504 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 514 insertions(+)
drivers/hid/Kconfig +6 -0
@@ -175,6 +175,12 @@ config HID_PRODIKEYS multimedia keyboard, but will lack support for the musical keyboard and some additional multimedia keys. +config HID_CP2112 + tristate "Silicon Labs CP2112 HID USB-to-SMBus Bridge support" + depends on USB_HID + ---help--- + Support for Silicon Labs CP2112 HID USB to SMBus Master Bridge. + config HID_CYPRESS tristate "Cypress mouse and barcode readers" if EXPERT depends on HID
drivers/hid/Makefile +1 -0
@@ -41,6 +41,7 @@ obj-$(CONFIG_HID_AUREAL) += hid-aureal.o obj-$(CONFIG_HID_BELKIN) += hid-belkin.o obj-$(CONFIG_HID_CHERRY) += hid-cherry.o obj-$(CONFIG_HID_CHICONY) += hid-chicony.o +obj-$(CONFIG_HID_CP2112) += hid-cp2112.o obj-$(CONFIG_HID_CYPRESS) += hid-cypress.o obj-$(CONFIG_HID_DRAGONRISE) += hid-dr.o obj-$(CONFIG_HID_EMS_FF) += hid-emsff.o
drivers/hid/hid-core.c +3 -0
@@ -1568,6 +1568,9 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_AK1D) }, { HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) }, +#if IS_ENABLED(CONFIG_HID_CP2112) + { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, 0xEA90) }, +#endif { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_1) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_2) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_BARCODE_3) },
drivers/hid/hid-cp2112.c new file +504 -0
504 lines not on this page · raw message
Signature · 1 line
tg: (584d88b..) upstream/hid-cp2112 (depends on: upstream/master)