From 734c660931095ae165c0db6ff60558fc4173bfd0 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Mon, 23 Apr 2012 12:07:03 +0200 Subject: HID: Scan the device for group info before adding it In order to allow the report descriptor to influence the hid device properties, one needs to parse the descriptor early, without reference to any driver. Scan the descriptor for group information during device add, before the device has been broadcast to userland. The device modalias will contain group information which can be used to differentiate between modules. For starters, just handle the generic group. Signed-off-by: Henrik Rydberg Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina --- include/linux/hid.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux') diff --git a/include/linux/hid.h b/include/linux/hid.h index a0e27ddb887d..f45d33d0c121 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -324,6 +324,11 @@ struct hid_item { #define HID_QUIRK_NO_IGNORE 0x40000000 #define HID_QUIRK_NO_INPUT_SYNC 0x80000000 +/* + * HID device groups + */ +#define HID_GROUP_GENERIC 0x0001 + /* * This is the global environment of the parser. This information is * persistent for main-items. The global environment can be saved and -- cgit v1.2.3