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
{
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 struct uhid_output_ev_req
{
76 } __attribute__((__packed__
));
78 struct uhid_feature_req
{
82 } __attribute__((__packed__
));
84 struct uhid_feature_answer_req
{
88 __u8 data
[UHID_DATA_MAX
];
95 struct uhid_create_req create
;
96 struct uhid_input_req input
;
97 struct uhid_output_req output
;
98 struct uhid_output_ev_req output_ev
;
99 struct uhid_feature_req feature
;
100 struct uhid_feature_answer_req feature_answer
;
102 } __attribute__((__packed__
));
104 #endif /* __UHID_H_ */