Skip to contentSkip to conversation

HID: sony: Add touchpad support for NSG-MR5U and NSG-MR7U remotes

PATCH New Todd Kelner 1 participant 1 message Feb 17, 2018 HID

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 HID: sony: Add touchpad support for NSG-MR5U and NSG-MR7U remotes

Sony's NSG-MR5U and NSG-MR7U remote controls have a full keyboard and a touchpad. The keyboard is already supported by the existing Linux kernel and drivers but the touchpad is not recognized. This patch adds the coded needed to bring full functionality to the touchpad.

Note that these remotes use the vendor code for SMK even though they are Sony branded.

Known limitations
- The built-in accelerometers are not supported by these changes
- When the Drag (Fn) key is used as a mouse button, the button is automatically released when the key begins repeating. There are two workarounds for this 1) Use the button behind the touchpad instead of the Drag (Fn) key or 2) Disable the key repeat functionality or increase the key repeat delay.

---
Changes in v2:
- Brought code up-to-date with latest changes from git
- Converted relative trackpad coordinates from unsigned to signed
- In sony_register_touchpad, merged two occurrences of input_mt_init_slots into one
- Added new parameters to sony_register_trackpad to support touch major and minor and orientation settings

 drivers/hid/hid-ids.h    |   3 ++
 drivers/hid/hid-quirks.c |   2 +
 drivers/hid/hid-sony.c   | 131 ++++++++++++++++++++++++++++++++++++++++++++---
 3 files changed, 130 insertions(+), 6 deletions(-)
drivers/hid/hid-ids.h +3 -0
index 43ddcdf..5d56387 100644
@@ -958,6 +958,9 @@
 
 #define USB_VENDOR_ID_SMK		0x0609
 #define USB_DEVICE_ID_SMK_PS3_BDREMOTE	0x0306
+#define USB_DEVICE_ID_SMK_NSG_MR5U_REMOTE       0x0368
+#define USB_DEVICE_ID_SMK_NSG_MR7U_REMOTE       0x0369
+
 
 #define USB_VENDOR_ID_SONY			0x054c
 #define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE	0x024b
drivers/hid/hid-quirks.c +2 -0
index 5f6035a..376cbbc 100644
@@ -608,6 +608,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
 #if IS_ENABLED(CONFIG_HID_SONY)
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_PS3) },
 	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SMK_PS3_BDREMOTE) },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SMK_NSG_MR5U_REMOTE) },
+	{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SMK_NSG_MR7U_REMOTE) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_BUZZ_CONTROLLER) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_MOTION_CONTROLLER) },
drivers/hid/hid-sony.c +125 -6

199 lines not on this page · raw message

Signature · 1 line
2.7.4