aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hidraw.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /include/linux/hidraw.h
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'include/linux/hidraw.h')
-rw-r--r--include/linux/hidraw.h44
1 files changed, 39 insertions, 5 deletions
diff --git a/include/linux/hidraw.h b/include/linux/hidraw.h
index 2451662c728..4b88e697c4e 100644
--- a/include/linux/hidraw.h
+++ b/include/linux/hidraw.h
@@ -1,6 +1,10 @@
1#ifndef _HIDRAW_H
2#define _HIDRAW_H
3
1/* 4/*
2 * Copyright (c) 2007 Jiri Kosina 5 * Copyright (c) 2007 Jiri Kosina
3 */ 6 */
7
4/* 8/*
5 * This program is free software; you can redistribute it and/or modify it 9 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License, 10 * under the terms and conditions of the GNU General Public License,
@@ -10,11 +14,39 @@
10 * this program; if not, write to the Free Software Foundation, Inc., 14 * this program; if not, write to the Free Software Foundation, Inc.,
11 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. 15 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
12 */ 16 */
13#ifndef _HIDRAW_H
14#define _HIDRAW_H
15 17
16#include <uapi/linux/hidraw.h> 18#include <linux/hid.h>
19#include <linux/types.h>
17 20
21struct hidraw_report_descriptor {
22 __u32 size;
23 __u8 value[HID_MAX_DESCRIPTOR_SIZE];
24};
25
26struct hidraw_devinfo {
27 __u32 bustype;
28 __s16 vendor;
29 __s16 product;
30};
31
32/* ioctl interface */
33#define HIDIOCGRDESCSIZE _IOR('H', 0x01, int)
34#define HIDIOCGRDESC _IOR('H', 0x02, struct hidraw_report_descriptor)
35#define HIDIOCGRAWINFO _IOR('H', 0x03, struct hidraw_devinfo)
36#define HIDIOCGRAWNAME(len) _IOC(_IOC_READ, 'H', 0x04, len)
37#define HIDIOCGRAWPHYS(len) _IOC(_IOC_READ, 'H', 0x05, len)
38/* The first byte of SFEATURE and GFEATURE is the report number */
39#define HIDIOCSFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len)
40#define HIDIOCGFEATURE(len) _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len)
41
42#define HIDRAW_FIRST_MINOR 0
43#define HIDRAW_MAX_DEVICES 64
44/* number of reports to buffer */
45#define HIDRAW_BUFFER_SIZE 64
46
47
48/* kernel-only API declarations */
49#ifdef __KERNEL__
18 50
19struct hidraw { 51struct hidraw {
20 unsigned int minor; 52 unsigned int minor;
@@ -44,15 +76,17 @@ struct hidraw_list {
44#ifdef CONFIG_HIDRAW 76#ifdef CONFIG_HIDRAW
45int hidraw_init(void); 77int hidraw_init(void);
46void hidraw_exit(void); 78void hidraw_exit(void);
47int hidraw_report_event(struct hid_device *, u8 *, int); 79void hidraw_report_event(struct hid_device *, u8 *, int);
48int hidraw_connect(struct hid_device *); 80int hidraw_connect(struct hid_device *);
49void hidraw_disconnect(struct hid_device *); 81void hidraw_disconnect(struct hid_device *);
50#else 82#else
51static inline int hidraw_init(void) { return 0; } 83static inline int hidraw_init(void) { return 0; }
52static inline void hidraw_exit(void) { } 84static inline void hidraw_exit(void) { }
53static inline int hidraw_report_event(struct hid_device *hid, u8 *data, int len) { return 0; } 85static inline void hidraw_report_event(struct hid_device *hid, u8 *data, int len) { }
54static inline int hidraw_connect(struct hid_device *hid) { return -1; } 86static inline int hidraw_connect(struct hid_device *hid) { return -1; }
55static inline void hidraw_disconnect(struct hid_device *hid) { } 87static inline void hidraw_disconnect(struct hid_device *hid) { }
56#endif 88#endif
57 89
58#endif 90#endif
91
92#endif