Skip to contentSkip to conversation

hwmon: corsair-cpro: Change to HID driver

PATCH New Marius Zachmann 1 participant 1 message Jul 15, 2020

Subsystems (3)
lore
Share & tools
lore

Marius Zachmann

author maintainer
#0 lore raw

PATCH v3 1/1 hwmon: corsair-cpro: Change to HID driver

This changes corsair-cpro to a hid driver using hid reports.

---
Changes from v2
- add more explanatory comment to justify late_initcall

Changes from v1
- add comment at the beginning about using hid and hidraw
- use hwmon_device_register_with_info and hwmon_device_unregister
- use a define for timeout

---
 drivers/hid/hid-quirks.c     |   2 -
 drivers/hwmon/Kconfig        |   4 +-
 drivers/hwmon/corsair-cpro.c | 127 ++++++++++++++++++++++++++---------
 3 files changed, 98 insertions(+), 35 deletions(-)
drivers/hid/hid-quirks.c +0 -2
index 7b7bc7737c53..ca8b5c261c7c 100644
@@ -699,8 +699,6 @@ static const struct hid_device_id hid_ignore_list[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_AXENTIA, USB_DEVICE_ID_AXENTIA_FM_RADIO) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CIDC, 0x0103) },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, 0x0c10) },
-	{ HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, 0x1d00) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI470X) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI4713) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CMEDIA, USB_DEVICE_ID_CM109) },
drivers/hwmon/Kconfig +1 -1
index 8b046a5dfa40..c603d8c8e3d2 100644
@@ -441,7 +441,7 @@ config SENSORS_BT1_PVT_ALARMS
 
 config SENSORS_CORSAIR_CPRO
 	tristate "Corsair Commander Pro controller"
-	depends on USB
+	depends on HID
 	help
 	  If you say yes here you get support for the Corsair Commander Pro
 	  controller.
drivers/hwmon/corsair-cpro.c +96 -31

215 lines not on this page · raw message

--
2.27.0