wacom_wac.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. /*
  2. * drivers/input/tablet/wacom_wac.h
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. */
  9. #ifndef WACOM_WAC_H
  10. #define WACOM_WAC_H
  11. #include <linux/types.h>
  12. /* maximum packet length for USB devices */
  13. #define WACOM_PKGLEN_MAX 32
  14. /* packet length for individual models */
  15. #define WACOM_PKGLEN_PENPRTN 7
  16. #define WACOM_PKGLEN_GRAPHIRE 8
  17. #define WACOM_PKGLEN_BBFUN 9
  18. #define WACOM_PKGLEN_INTUOS 10
  19. #define WACOM_PKGLEN_TPC1FG 5
  20. #define WACOM_PKGLEN_TPC2FG 14
  21. #define WACOM_PKGLEN_BBTOUCH 20
  22. /* device IDs */
  23. #define STYLUS_DEVICE_ID 0x02
  24. #define TOUCH_DEVICE_ID 0x03
  25. #define CURSOR_DEVICE_ID 0x06
  26. #define ERASER_DEVICE_ID 0x0A
  27. #define PAD_DEVICE_ID 0x0F
  28. /* wacom data packet report IDs */
  29. #define WACOM_REPORT_PENABLED 2
  30. #define WACOM_REPORT_INTUOSREAD 5
  31. #define WACOM_REPORT_INTUOSWRITE 6
  32. #define WACOM_REPORT_INTUOSPAD 12
  33. #define WACOM_REPORT_TPC1FG 6
  34. #define WACOM_REPORT_TPC2FG 13
  35. /* device quirks */
  36. #define WACOM_QUIRK_MULTI_INPUT 0x0001
  37. #define WACOM_QUIRK_BBTOUCH_LOWRES 0x0002
  38. enum {
  39. PENPARTNER = 0,
  40. GRAPHIRE,
  41. WACOM_G4,
  42. PTU,
  43. PL,
  44. DTU,
  45. BAMBOO_PT,
  46. INTUOS,
  47. INTUOS3S,
  48. INTUOS3,
  49. INTUOS3L,
  50. INTUOS4S,
  51. INTUOS4,
  52. INTUOS4L,
  53. WACOM_21UX2,
  54. CINTIQ,
  55. WACOM_BEE,
  56. WACOM_MO,
  57. TABLETPC,
  58. TABLETPC2FG,
  59. MAX_TYPE
  60. };
  61. struct wacom_features {
  62. const char *name;
  63. int pktlen;
  64. int x_max;
  65. int y_max;
  66. int pressure_max;
  67. int distance_max;
  68. int type;
  69. int x_resolution;
  70. int y_resolution;
  71. int device_type;
  72. int x_phy;
  73. int y_phy;
  74. unsigned char unit;
  75. unsigned char unitExpo;
  76. int x_fuzz;
  77. int y_fuzz;
  78. int pressure_fuzz;
  79. int distance_fuzz;
  80. unsigned quirks;
  81. };
  82. struct wacom_shared {
  83. bool stylus_in_proximity;
  84. bool touch_down;
  85. };
  86. struct wacom_wac {
  87. char name[64];
  88. unsigned char *data;
  89. int tool[2];
  90. int id[2];
  91. __u32 serial[2];
  92. struct wacom_features features;
  93. struct wacom_shared *shared;
  94. struct input_dev *input;
  95. };
  96. #endif