5 * User-space I/O driver support for HID subsystem
6 * Copyright (c) 2012 David Herrmann
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the Free
12 * Software Foundation; either version 2 of the License, or (at your option)
17 * Public header for user-space communication. We try to keep every structure
18 * aligned but to be safe we also use __attribute__((__packed__)). Therefore,
19 * the communication should be ABI compatible even between architectures.
22 #include <linux/input.h>
23 #include <linux/types.h>
25 enum uhid_event_type
{
33 UHID_OUTPUT_EV
, /* obsolete! */
39 struct uhid_create_req
{
51 } __attribute__((__packed__
));
53 #define UHID_DATA_MAX 4096
55 enum uhid_report_type
{
61 struct uhid_input_req
{
62 __u8 data
[UHID_DATA_MAX
];
64 } __attribute__((__packed__
));
66 struct uhid_output_req
{
67 __u8 data
[UHID_DATA_MAX
];
70 } __attribute__((__packed__
));
72 /* Obsolete! Newer kernels will no longer send these events but instead convert
73 * it into raw output reports via UHID_OUTPUT. */
74 struct uhid_output_ev_req
{
78 } __attribute__((__packed__
));
80 struct uhid_feature_req
{
84 } __attribute__((__packed__
));
86 struct uhid_feature_answer_req
{
90 __u8 data
[UHID_DATA_MAX
];
91 } __attribute__((__packed__
));
97 struct uhid_create_req create
;
98 struct uhid_input_req input
;
99 struct uhid_output_req output
;
100 struct uhid_output_ev_req output_ev
;
101 struct uhid_feature_req feature
;
102 struct uhid_feature_answer_req feature_answer
;
104 } __attribute__((__packed__
));
106 #endif /* __UHID_H_ */