diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2022-09-02 15:29:24 +0200 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2022-09-20 11:53:32 +0100 |
commit | ead77b65aef430d3bfe63524c243a60a29eb8d90 (patch) | |
tree | aca70019337e7b9ce377c577b9f6ca17264dac77 /include/uapi/linux/hid.h | |
parent | 1e839143d674603b0bbbc4c513bca35404967dbc (diff) | |
download | linux-ead77b65aef430d3bfe63524c243a60a29eb8d90.tar.gz linux-ead77b65aef430d3bfe63524c243a60a29eb8d90.tar.bz2 linux-ead77b65aef430d3bfe63524c243a60a29eb8d90.zip |
HID: export hid_report_type to uapi
When we are dealing with eBPF, we need to have access to the report type.
Currently our implementation differs from the USB standard, making it
impossible for users to know the exact value besides hardcoding it
themselves.
And instead of a blank define, convert it as an enum.
Note that we need to also do change in the ll_driver API, but given
that this will have a wider impact outside of this tree, we leave this
as a TODO for the future.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20220902132938.2409206-10-benjamin.tissoires@redhat.com
Diffstat (limited to 'include/uapi/linux/hid.h')
-rw-r--r-- | include/uapi/linux/hid.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/uapi/linux/hid.h b/include/uapi/linux/hid.h index b34492a87a8a..b25b0bacaff2 100644 --- a/include/uapi/linux/hid.h +++ b/include/uapi/linux/hid.h @@ -43,6 +43,18 @@ #define USB_INTERFACE_PROTOCOL_MOUSE 2 /* + * HID report types --- Ouch! HID spec says 1 2 3! + */ + +enum hid_report_type { + HID_INPUT_REPORT = 0, + HID_OUTPUT_REPORT = 1, + HID_FEATURE_REPORT = 2, + + HID_REPORT_TYPES, +}; + +/* * HID class requests */ |