Commit: 35a2c50437cca4d26ac6537ce3a964bb509c9b62
Parent: e892dd0cd7689c1ffb8ad2c07113acc9d19e3973
Author: Dean Camera <dean@fourwalledcubicle.com>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2020-11-20 19:46:02
Tree: 4696da58db409879c3d77d911d74d2a37c9a9f57

hog: Fix stripping off read report bytes If the HID subsystem requests a HID report to be read from the device, we currently incorrectly strip off the first byte of the response, if the device has report IDs set in the HID report descriptor. This is incorrect; unlike USB HID, the report ID is *not* included in the HOG profile's HID reports, and instead exists out of band in a descriptor on the report's bluetooth characteristic in the device. In this patch, we remove the erroneous stripping of the first byte of the report, and (if report IDs are enabled) prepend the report ID to the front of the result. This makes the HID report returned indentical in format to that of a USB HID report, so that the upper HID drivers can consume HOG device reports in the same way as USB.

Diffstat

M profiles/input/hog-lib.c | 17 ++++++++++- - - - - - -

1 files changed, 10 insertions(+), 7 deletions(-)

View Full Diff | Patch