]> rtime.felk.cvut.cz Git - l4.git/blobdiff - l4/pkg/linux-26-headers/include/linux/hidraw.h
update
[l4.git] / l4 / pkg / linux-26-headers / include / linux / hidraw.h
index dbb5c8c374f01c286e1bfaa0e2da00c67718c88c..e781b0eadb053945b8f2b01bb47a90462fbc5a7f 100644 (file)
@@ -1,10 +1,6 @@
-#ifndef _HIDRAW_H
-#define _HIDRAW_H
-
 /*
  *  Copyright (c) 2007 Jiri Kosina
  */
-
 /*
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
  * this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
  */
+#ifndef _HIDRAW_H
+#define _HIDRAW_H
+
+
 
 #include <linux/hid.h>
 #include <linux/types.h>
@@ -33,6 +33,11 @@ struct hidraw_devinfo {
 #define HIDIOCGRDESCSIZE       _IOR('H', 0x01, int)
 #define HIDIOCGRDESC           _IOR('H', 0x02, struct hidraw_report_descriptor)
 #define HIDIOCGRAWINFO         _IOR('H', 0x03, struct hidraw_devinfo)
+#define HIDIOCGRAWNAME(len)     _IOC(_IOC_READ, 'H', 0x04, len)
+#define HIDIOCGRAWPHYS(len)     _IOC(_IOC_READ, 'H', 0x05, len)
+/* The first byte of SFEATURE and GFEATURE is the report number */
+#define HIDIOCSFEATURE(len)    _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x06, len)
+#define HIDIOCGFEATURE(len)    _IOC(_IOC_WRITE|_IOC_READ, 'H', 0x07, len)
 
 #define HIDRAW_FIRST_MINOR 0
 #define HIDRAW_MAX_DEVICES 64
@@ -41,47 +46,5 @@ struct hidraw_devinfo {
 
 
 /* kernel-only API declarations */
-#ifdef __KERNEL__
-
-struct hidraw {
-       unsigned int minor;
-       int exist;
-       int open;
-       wait_queue_head_t wait;
-       struct hid_device *hid;
-       struct device *dev;
-       struct list_head list;
-};
-
-struct hidraw_report {
-       __u8 *value;
-       int len;
-};
-
-struct hidraw_list {
-       struct hidraw_report buffer[HIDRAW_BUFFER_SIZE];
-       int head;
-       int tail;
-       struct fasync_struct *fasync;
-       struct hidraw *hidraw;
-       struct list_head node;
-       struct mutex read_mutex;
-};
-
-#ifdef CONFIG_HIDRAW
-int hidraw_init(void);
-void hidraw_exit(void);
-void hidraw_report_event(struct hid_device *, u8 *, int);
-int hidraw_connect(struct hid_device *);
-void hidraw_disconnect(struct hid_device *);
-#else
-static inline int hidraw_init(void) { return 0; }
-static inline void hidraw_exit(void) { }
-static inline void hidraw_report_event(struct hid_device *hid, u8 *data, int len) { }
-static inline int hidraw_connect(struct hid_device *hid) { return -1; }
-static inline void hidraw_disconnect(struct hid_device *hid) { }
-#endif
-
-#endif
 
-#endif
+#endif /* _HIDRAW_H */