Skip to contentSkip to conversation

HID: switch hid-rmi to rmi_core

PATCH In review Benjamin Tissoires 2 participants 5 messages Jan 5, 2017 – Jan 11, 2017 HID

lore
Share & tools
lore
#0 lore raw

v4 cover HID: switch hid-rmi to rmi_core

Hi,

Small revision to add irq.h in hid-rmi.c, as reported by the Intel kbuild test bot and by Andrew.

Cheers,
Benjamin

Andrew Duggan (3):
HID: rmi: Make hid-rmi a transport driver for synaptics-rmi4
HID: rmi: Handle all Synaptics touchpads using hid-rmi
HID: rmi: Support the Lenovo Thinkpad X1 Tablet dock using hid-rmi

 drivers/hid/Kconfig    |   5 +
 drivers/hid/hid-core.c |   4 +-
 drivers/hid/hid-ids.h  |   1 +
 drivers/hid/hid-rmi.c  | 975 +++++++------------------------------------------
 4 files changed, 151 insertions(+), 834 deletions(-)
Signature · 1 line
2.9.3
#1 lore raw

PATCH v4 1/3 HID: rmi: Make hid-rmi a transport driver for synaptics-rmi4

From: Andrew Duggan <[email protected]>

The Synaptics RMI4 driver provides support for RMI4 devices. Instead of duplicating the RMI4 processing code, make hid-rmi a transport driver and register it with the Synaptics RMI4 core.

---

changes in v4:
- added irq.h to handle compilation on non x86_64 platforms

changes in v3:
- added RMI_F03 in Kconfig

no changes in v2

---
 drivers/hid/Kconfig   |   5 +
 drivers/hid/hid-rmi.c | 974 ++++++++------------------------------------------
 2 files changed, 146 insertions(+), 833 deletions(-)
drivers/hid/Kconfig +5 -0
index 69f2b2f..05ced96 100644
@@ -786,6 +786,11 @@ config HID_SUNPLUS
 config HID_RMI
 	tristate "Synaptics RMI4 device support"
 	depends on HID
+	select RMI4_CORE
+	select RMI4_F03
+	select RMI4_F11
+	select RMI4_F12
+	select RMI4_F30
 	---help---
 	Support for Synaptics RMI4 touchpads.
 	Say Y here if you have a Synaptics RMI4 touchpads over i2c-hid or usbhid
drivers/hid/hid-rmi.c +141 -833

1,169 lines not on this page · raw message

Signature · 1 line
2.9.3
#2 lore raw

PATCH v4 2/3 HID: rmi: Handle all Synaptics touchpads using hid-rmi

In reply to Benjamin Tissoires

From: Andrew Duggan <[email protected]>

With the addition of HID and F12 support in the synaptics-rmi4 driver touchpads which had been using the hid-multitouch driver can now be support by the synaptics-rmi4 via hid-rmi. The advantage is that additional data can be reported from the RMI registers which is not available in the Microsoft Precision Touchpad collection.

---

no changes in v4

no changes in v3

no changes in v2

---
 drivers/hid/hid-core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/hid/hid-core.c +2 -1
index db87d91..7e8b99e 100644
@@ -825,7 +825,8 @@ static int hid_scan_report(struct hid_device *hid)
 		hid->group = HID_GROUP_WACOM;
 		break;
 	case USB_VENDOR_ID_SYNAPTICS:
-		if (hid->group == HID_GROUP_GENERIC)
+		if (hid->group == HID_GROUP_GENERIC ||
+		    hid->group == HID_GROUP_MULTITOUCH_WIN_8)
 			if ((parser->scan_flags & HID_SCAN_FLAG_VENDOR_SPECIFIC)
 			    && (parser->scan_flags & HID_SCAN_FLAG_GD_POINTER))
 				/*
Signature · 1 line
2.9.3
#3 lore raw

PATCH v4 3/3 HID: rmi: Support the Lenovo Thinkpad X1 Tablet dock using hid-rmi

In reply to Benjamin Tissoires

From: Andrew Duggan <[email protected]>

---

no changes in v4

no changes in v3

no changes in v2

---
 drivers/hid/hid-core.c | 1 +
 drivers/hid/hid-ids.h  | 1 +
 drivers/hid/hid-rmi.c  | 1 +
 3 files changed, 3 insertions(+)
drivers/hid/hid-core.c +1 -0
index 7e8b99e..bbbc04d 100644
@@ -2125,6 +2125,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_NINTENDO, USB_DEVICE_ID_NINTENDO_WIIMOTE2) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_RAZER, USB_DEVICE_ID_RAZER_BLADE_14) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CMEDIA, USB_DEVICE_ID_CM6533) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_X1_COVER) },
 	{ }
 };
 
drivers/hid/hid-ids.h +1 -0
index 1f79005..ce3ee97 100644
@@ -627,6 +627,7 @@
 #define USB_DEVICE_ID_LENOVO_CUSBKBD	0x6047
 #define USB_DEVICE_ID_LENOVO_CBTKBD	0x6048
 #define USB_DEVICE_ID_LENOVO_TPPRODOCK	0x6067
+#define USB_DEVICE_ID_LENOVO_X1_COVER	0x6085
 
 #define USB_VENDOR_ID_LG		0x1fd2
 #define USB_DEVICE_ID_LG_MULTITOUCH	0x0064
drivers/hid/hid-rmi.c +1 -0
index 8056edd..5b40c26 100644
@@ -716,6 +716,7 @@ static void rmi_remove(struct hid_device *hdev)
 static const struct hid_device_id rmi_id[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_RAZER, USB_DEVICE_ID_RAZER_BLADE_14),
 		.driver_data = RMI_DEVICE_HAS_PHYS_BUTTONS },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_X1_COVER) },
 	{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_RMI, HID_ANY_ID, HID_ANY_ID) },
 	{ }
 };
Signature · 1 line
2.9.3
maintainer
#4 lore raw
In reply to Benjamin Tissoires
Quoted 5 lines · Benjamin Tissoires

Hi,

Small revision to add irq.h in hid-rmi.c, as reported by the Intel kbuild test bot and by Andrew.

Quoted 7 lines

Cheers,
Benjamin

Andrew Duggan (3):
HID: rmi: Make hid-rmi a transport driver for synaptics-rmi4
HID: rmi: Handle all Synaptics touchpads using hid-rmi
HID: rmi: Support the Lenovo Thinkpad X1 Tablet dock using hid-rmi

Very nice work. I am glad to finally say: applied to for-4.11/rmi :) Thanks!

Signature · 2 lines
Jiri Kosina
SUSE Labs