]> git.ipfire.org Git - thirdparty/linux.git/blame - include/linux/hid-debug.h
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156
[thirdparty/linux.git] / include / linux / hid-debug.h
CommitLineData
1a59d1b8 1/* SPDX-License-Identifier: GPL-2.0-or-later */
c080d89a
JK
2#ifndef __HID_DEBUG_H
3#define __HID_DEBUG_H
4
1da177e4 5/*
a635f9dd 6 * Copyright (c) 2007-2009 Jiri Kosina
1da177e4
LT
7 */
8
9/*
1da177e4
LT
10 */
11
a635f9dd 12#ifdef CONFIG_DEBUG_FS
1da177e4 13
13054abb
VD
14#include <linux/kfifo.h>
15
a5f04b9d 16#define HID_DEBUG_BUFSIZE 512
13054abb 17#define HID_DEBUG_FIFOSIZE 512
a5f04b9d 18
cd667ce2 19void hid_dump_input(struct hid_device *, struct hid_usage *, __s32);
a5f04b9d 20void hid_dump_report(struct hid_device *, int , u8 *, int);
a635f9dd
JK
21void hid_dump_device(struct hid_device *, struct seq_file *);
22void hid_dump_field(struct hid_field *, int, struct seq_file *);
cd667ce2 23char *hid_resolv_usage(unsigned, struct seq_file *);
a635f9dd
JK
24void hid_debug_register(struct hid_device *, const char *);
25void hid_debug_unregister(struct hid_device *);
26void hid_debug_init(void);
27void hid_debug_exit(void);
cd667ce2
JK
28void hid_debug_event(struct hid_device *, char *);
29
cd667ce2 30struct hid_debug_list {
13054abb 31 DECLARE_KFIFO_PTR(hid_debug_fifo, char);
cd667ce2
JK
32 struct fasync_struct *fasync;
33 struct hid_device *hdev;
34 struct list_head node;
35 struct mutex read_mutex;
36};
1da177e4 37
c080d89a 38#else
1da177e4 39
38b7f49a 40#define hid_dump_input(a,b,c) do { } while (0)
a5f04b9d 41#define hid_dump_report(a,b,c,d) do { } while (0)
38b7f49a
JK
42#define hid_dump_device(a,b) do { } while (0)
43#define hid_dump_field(a,b,c) do { } while (0)
44#define hid_resolv_usage(a,b) do { } while (0)
a635f9dd
JK
45#define hid_debug_register(a, b) do { } while (0)
46#define hid_debug_unregister(a) do { } while (0)
47#define hid_debug_init() do { } while (0)
48#define hid_debug_exit() do { } while (0)
cd667ce2 49#define hid_debug_event(a,b) do { } while (0)
1da177e4 50
a635f9dd 51#endif
1da177e4 52
c080d89a 53#endif