Skip to contentSkip to conversation

HID: google: add google hammer HID driver

PATCH Superseded Wei-Ning Huang 1 participant 1 message Aug 17, 2017 HID

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: google: add google hammer HID driver

Add Google hammer HID driver. This driver allow us to control hammer keyboard backlights and support future features.

---
 drivers/hid/Kconfig             |   6 +++
 drivers/hid/Makefile            |   1 +
 drivers/hid/hid-core.c          |   4 ++
 drivers/hid/hid-google-hammer.c | 108 ++++++++++++++++++++++++++++++++++++++++
 drivers/hid/hid-ids.h           |   3 ++
 5 files changed, 122 insertions(+)
 create mode 100644 drivers/hid/hid-google-hammer.c
drivers/hid/Kconfig +6 -0
index 3cd60f460b61..efc71acbcf5b 100644
@@ -329,6 +329,12 @@ config HOLTEK_FF
 	  Say Y here if you have a Holtek On Line Grip based game controller
 	  and want to have force feedback support for it.
 
+config HID_GOOGLE_HAMMER
+	tristate "Google Hammer Keyboard"
+	depends on USB_HID && LEDS_CLASS
+	---help---
+	Say Y here if you have a Google Hammer device.
+
 config HID_GT683R
 	tristate "MSI GT68xR LED support"
 	depends on LEDS_CLASS && USB_HID
drivers/hid/Makefile +1 -0
index 8659d7e633a5..b5d3039286e3 100644
@@ -43,6 +43,7 @@ obj-$(CONFIG_HID_ELO)		+= hid-elo.o
 obj-$(CONFIG_HID_EZKEY)		+= hid-ezkey.o
 obj-$(CONFIG_HID_GEMBIRD)	+= hid-gembird.o
 obj-$(CONFIG_HID_GFRM)		+= hid-gfrm.o
+obj-$(CONFIG_HID_GOOGLE_HAMMER)	+= hid-google-hammer.o
 obj-$(CONFIG_HID_GT683R)	+= hid-gt683r.o
 obj-$(CONFIG_HID_GYRATION)	+= hid-gyration.o
 obj-$(CONFIG_HID_HOLTEK)	+= hid-holtek-kbd.o
drivers/hid/hid-core.c +4 -0
index 9017dcc14502..3894e31a0c95 100644
@@ -2213,6 +2213,10 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_17) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18) },
 #endif
+#if IS_ENABLED(CONFIG_HID_GOOGLE_HAMMER)
+	{ HID_USB_DEVICE(USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_HAMMER) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_GOOGLE, USB_DEVICE_ID_GOOGLE_STAFF) },
+#endif
 #if IS_ENABLED(CONFIG_HID_ORTEK)
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_PKB1700) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
drivers/hid/hid-google-hammer.c new file +108 -0

108 lines not on this page · raw message

drivers/hid/hid-ids.h +3 -0
index c9ba4c6db74c..193959700df8 100644
@@ -434,7 +434,10 @@
 #define USB_DEVICE_ID_GOODTOUCH_000f	0x000f
 
 #define USB_VENDOR_ID_GOOGLE		0x18d1
+#define USB_DEVICE_ID_GOOGLE_QUICKSTEP	0x0477
+#define USB_DEVICE_ID_GOOGLE_HAMMER	0x5022
 #define USB_DEVICE_ID_GOOGLE_TOUCH_ROSE	0x5028
+#define USB_DEVICE_ID_GOOGLE_STAFF	0x502b
 
 #define USB_VENDOR_ID_GOTOP		0x08f2
 #define USB_DEVICE_ID_SUPER_Q2		0x007f
Signature · 1 line
2.12.2