diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-13 18:59:05 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-06-13 18:59:05 +0300 |
commit | c11fb13a117e5a6736481c779cb971249ed96016 (patch) | |
tree | caff8ee4d3091816270f2ec7ff9c3011fa2c2146 /drivers/hid/hid-rmi.c | |
parent | b076173a309e2ceae84257d1d52cd3cc53b00e39 (diff) | |
parent | 3ed224e273ac5880eeab4c3043a6b06b0478dd56 (diff) | |
download | linux-c11fb13a117e5a6736481c779cb971249ed96016.tar.xz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID fixes from Jiri Kosina:
- regression fixes (reverts) for module loading changes that turned out
to be incompatible with some userspace, from Benjamin Tissoires
- regression fix for special Logitech unifiying receiver 0xc52f, from
Hans de Goede
- a few device ID additions to logitech driver, from Hans de Goede
- fix for Bluetooth support on 2nd-gen Wacom Intuos Pro, from Jason
Gerecke
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid:
HID: logitech-dj: Fix 064d:c52f receiver support
Revert "HID: core: Call request_module before doing device_add"
Revert "HID: core: Do not call request_module() in async context"
Revert "HID: Increase maximum report size allowed by hid_field_extract()"
HID: a4tech: fix horizontal scrolling
HID: hyperv: Add a module description line
HID: logitech-hidpp: Add support for the S510 remote control
HID: multitouch: handle faulty Elo touch device
HID: wacom: Sync INTUOSP2_BT touch state after each frame if necessary
HID: wacom: Correct button numbering 2nd-gen Intuos Pro over Bluetooth
HID: wacom: Send BTN_TOUCH in response to INTUOSP2_BT eraser contact
HID: wacom: Don't report anything prior to the tool entering range
HID: wacom: Don't set tool type until we're in range
HID: rmi: Use SET_REPORT request on control endpoint for Acer Switch 3 and 5
HID: logitech-hidpp: add support for the MX5500 keyboard
HID: logitech-dj: add support for the Logitech MX5500's Bluetooth Mini-Receiver
HID: i2c-hid: add iBall Aer3 to descriptor override
Diffstat (limited to 'drivers/hid/hid-rmi.c')
-rw-r--r-- | drivers/hid/hid-rmi.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/hid/hid-rmi.c b/drivers/hid/hid-rmi.c index 853842448f70..7c6abd7e0979 100644 --- a/drivers/hid/hid-rmi.c +++ b/drivers/hid/hid-rmi.c @@ -35,6 +35,7 @@ /* device flags */ #define RMI_DEVICE BIT(0) #define RMI_DEVICE_HAS_PHYS_BUTTONS BIT(1) +#define RMI_DEVICE_OUTPUT_SET_REPORT BIT(2) /* * retrieve the ctrl registers @@ -163,9 +164,19 @@ static int rmi_set_mode(struct hid_device *hdev, u8 mode) static int rmi_write_report(struct hid_device *hdev, u8 *report, int len) { + struct rmi_data *data = hid_get_drvdata(hdev); int ret; - ret = hid_hw_output_report(hdev, (void *)report, len); + if (data->device_flags & RMI_DEVICE_OUTPUT_SET_REPORT) { + /* + * Talk to device by using SET_REPORT requests instead. + */ + ret = hid_hw_raw_request(hdev, report[0], report, + len, HID_OUTPUT_REPORT, HID_REQ_SET_REPORT); + } else { + ret = hid_hw_output_report(hdev, (void *)report, len); + } + if (ret < 0) { dev_err(&hdev->dev, "failed to write hid report (%d)\n", ret); return ret; @@ -747,6 +758,8 @@ static const struct hid_device_id rmi_id[] = { .driver_data = RMI_DEVICE_HAS_PHYS_BUTTONS }, { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_X1_COVER) }, { HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_REZEL) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5), + .driver_data = RMI_DEVICE_OUTPUT_SET_REPORT }, { HID_DEVICE(HID_BUS_ANY, HID_GROUP_RMI, HID_ANY_ID, HID_ANY_ID) }, { } }; |