mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
HID: core: add "report" hook, called once the report has been parsed
This callback is called when the parsing of the report has been done by hid-core (so after the calls to .event). The hid drivers can now have access to the whole report by relying on the values stored in the different fields. Signed-off-by: Benjamin Tissoires <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
cf5425bfcd
commit
6d85d037d6
2 changed files with 6 additions and 0 deletions
|
|
@ -1195,6 +1195,7 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size,
|
|||
{
|
||||
struct hid_report_enum *report_enum = hid->report_enum + type;
|
||||
struct hid_report *report;
|
||||
struct hid_driver *hdrv;
|
||||
unsigned int a;
|
||||
int rsize, csize = size;
|
||||
u8 *cdata = data;
|
||||
|
|
@ -1231,6 +1232,9 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size,
|
|||
if (hid->claimed != HID_CLAIMED_HIDRAW) {
|
||||
for (a = 0; a < report->maxfield; a++)
|
||||
hid_input_field(hid, report->field[a], cdata, interrupt);
|
||||
hdrv = hid->driver;
|
||||
if (hdrv && hdrv->report)
|
||||
hdrv->report(hid, report);
|
||||
}
|
||||
|
||||
if (hid->claimed & HID_CLAIMED_INPUT)
|
||||
|
|
|
|||
Loading…
Reference in a new issue