Skip to contentSkip to conversation

HID: New hid-cp2112 driver.

PATCH Superseded David Barksdale 1 participant 1 message Aug 13, 2013 HID

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

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.

---
 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
index 14ef6ab..1833948 100644
@@ -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
index 6f68728..a88a5c4 100644
@@ -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
index 36668d1..b472a0d 100644
@@ -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)