HID: logitech-hidpp: Support translations from short to long reports
authorMazin Rezk <mnrzk@protonmail.com>
Sun, 27 Oct 2019 17:44:06 +0000 (17:44 +0000)
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>
Wed, 18 Dec 2019 14:35:25 +0000 (15:35 +0100)
commitc2a932717a5106db97f3480b040b8f74a1761889
treed94f77cf2cad275a2fed6f39da0951755ec8a969
parentd004701d1cc5a036b1f2dec34dd5973064c72eab
HID: logitech-hidpp: Support translations from short to long reports

This patch allows short reports to be translated into long reports.

hidpp_validate_device now returns a u8 instead of a bool which represents
the supported reports. The corresponding bits (i.e.
HIDPP_REPORT_*_SUPPORTED) are set if an HID++ report is supported.

If a short report is being sent and the device does not support it, it is
instead sent as a long report.

This patch also introduces support for the MX Master (b01e and b012).

Signed-off-by: Mazin Rezk <mnrzk@protonmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
drivers/hid/hid-logitech-hidpp.c