hid-debug.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. #ifndef __HID_DEBUG_H
  3. #define __HID_DEBUG_H
  4. /*
  5. * Copyright (c) 2007-2009 Jiri Kosina
  6. */
  7. /*
  8. */
  9. #ifdef CONFIG_DEBUG_FS
  10. #include <linux/kfifo.h>
  11. #define HID_DEBUG_BUFSIZE 512
  12. #define HID_DEBUG_FIFOSIZE 512
  13. void hid_dump_input(struct hid_device *, struct hid_usage *, __s32);
  14. void hid_dump_report(struct hid_device *, int , u8 *, int);
  15. void hid_dump_device(struct hid_device *, struct seq_file *);
  16. void hid_dump_field(struct hid_field *, int, struct seq_file *);
  17. char *hid_resolv_usage(unsigned, struct seq_file *);
  18. void hid_debug_register(struct hid_device *, const char *);
  19. void hid_debug_unregister(struct hid_device *);
  20. void hid_debug_init(void);
  21. void hid_debug_exit(void);
  22. void hid_debug_event(struct hid_device *, char *);
  23. struct hid_debug_list {
  24. DECLARE_KFIFO_PTR(hid_debug_fifo, char);
  25. struct fasync_struct *fasync;
  26. struct hid_device *hdev;
  27. struct list_head node;
  28. struct mutex read_mutex;
  29. };
  30. #else
  31. #define hid_dump_input(a,b,c) do { } while (0)
  32. #define hid_dump_report(a,b,c,d) do { } while (0)
  33. #define hid_dump_device(a,b) do { } while (0)
  34. #define hid_dump_field(a,b,c) do { } while (0)
  35. #define hid_resolv_usage(a,b) do { } while (0)
  36. #define hid_debug_register(a, b) do { } while (0)
  37. #define hid_debug_unregister(a) do { } while (0)
  38. #define hid_debug_init() do { } while (0)
  39. #define hid_debug_exit() do { } while (0)
  40. #define hid_debug_event(a,b) do { } while (0)
  41. #endif
  42. #endif