Blame view

include/linux/hiddev.h 1.42 KB
1a59d1b8e   Thomas Gleixner   treewide: Replace...
1
  /* SPDX-License-Identifier: GPL-2.0-or-later */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
2
  /*
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
3
4
5
6
   *  Copyright (c) 1999-2000 Vojtech Pavlik
   *
   *  Sponsored by SuSE
   */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
7
  /*
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
8
9
10
11
12
   * 
   * Should you need to contact me, the author, you can do so either by
   * e-mail - mail your message to <vojtech@suse.cz>, or by paper mail:
   * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic
   */
607ca46e9   David Howells   UAPI: (Scripted) ...
13
14
  #ifndef _HIDDEV_H
  #define _HIDDEV_H
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
15

607ca46e9   David Howells   UAPI: (Scripted) ...
16
  #include <uapi/linux/hiddev.h>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
17

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
18
19
20
21
  
  /*
   * In-kernel definitions.
   */
733aca903   Jaejoong Kim   HID: hiddev: real...
22
23
24
25
26
27
28
29
30
31
32
  struct hiddev {
  	int minor;
  	int exist;
  	int open;
  	struct mutex existancelock;
  	wait_queue_head_t wait;
  	struct hid_device *hid;
  	struct list_head list;
  	spinlock_t list_lock;
  	bool initialized;
  };
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
33
34
35
36
37
38
  struct hid_device;
  struct hid_usage;
  struct hid_field;
  struct hid_report;
  
  #ifdef CONFIG_USB_HIDDEV
93c10132a   Jiri Slaby   HID: move connect...
39
  int hiddev_connect(struct hid_device *hid, unsigned int force);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
40
41
  void hiddev_disconnect(struct hid_device *);
  void hiddev_hid_event(struct hid_device *hid, struct hid_field *field,
7d12e780e   David Howells   IRQ: Maintain reg...
42
  		      struct hid_usage *usage, __s32 value);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
43
  void hiddev_report_event(struct hid_device *hid, struct hid_report *report);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
44
  #else
93c10132a   Jiri Slaby   HID: move connect...
45
46
47
  static inline int hiddev_connect(struct hid_device *hid,
  		unsigned int force)
  { return -1; }
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
48
49
  static inline void hiddev_disconnect(struct hid_device *hid) { }
  static inline void hiddev_hid_event(struct hid_device *hid, struct hid_field *field,
7d12e780e   David Howells   IRQ: Maintain reg...
50
  		      struct hid_usage *usage, __s32 value) { }
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
51
  static inline void hiddev_report_event(struct hid_device *hid, struct hid_report *report) { }
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
52
53
54
  #endif
  
  #endif