hid-sensor-ids.h 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * HID Sensors Driver
  4. * Copyright (c) 2012, Intel Corporation.
  5. */
  6. #ifndef _HID_SENSORS_IDS_H
  7. #define _HID_SENSORS_IDS_H
  8. #define HID_MAX_PHY_DEVICES 0xFF
  9. #define HID_USAGE_SENSOR_COLLECTION 0x200001
  10. /* Accel 3D (200073) */
  11. #define HID_USAGE_SENSOR_ACCEL_3D 0x200073
  12. #define HID_USAGE_SENSOR_DATA_ACCELERATION 0x200452
  13. #define HID_USAGE_SENSOR_ACCEL_X_AXIS 0x200453
  14. #define HID_USAGE_SENSOR_ACCEL_Y_AXIS 0x200454
  15. #define HID_USAGE_SENSOR_ACCEL_Z_AXIS 0x200455
  16. /* ALS (200041) */
  17. #define HID_USAGE_SENSOR_ALS 0x200041
  18. #define HID_USAGE_SENSOR_DATA_LIGHT 0x2004d0
  19. #define HID_USAGE_SENSOR_LIGHT_ILLUM 0x2004d1
  20. /* PROX (200011) */
  21. #define HID_USAGE_SENSOR_PROX 0x200011
  22. #define HID_USAGE_SENSOR_DATA_PRESENCE 0x2004b0
  23. #define HID_USAGE_SENSOR_HUMAN_PRESENCE 0x2004b1
  24. /* Pressure (200031) */
  25. #define HID_USAGE_SENSOR_PRESSURE 0x200031
  26. #define HID_USAGE_SENSOR_DATA_ATMOSPHERIC_PRESSURE 0x200430
  27. #define HID_USAGE_SENSOR_ATMOSPHERIC_PRESSURE 0x200431
  28. /* Tempreture (200033) */
  29. #define HID_USAGE_SENSOR_TEMPERATURE 0x200033
  30. #define HID_USAGE_SENSOR_DATA_ENVIRONMENTAL_TEMPERATURE 0x200434
  31. /* humidity */
  32. #define HID_USAGE_SENSOR_HUMIDITY 0x200032
  33. #define HID_USAGE_SENSOR_ATMOSPHERIC_HUMIDITY 0x200433
  34. /* Gyro 3D: (200076) */
  35. #define HID_USAGE_SENSOR_GYRO_3D 0x200076
  36. #define HID_USAGE_SENSOR_DATA_ANGL_VELOCITY 0x200456
  37. #define HID_USAGE_SENSOR_ANGL_VELOCITY_X_AXIS 0x200457
  38. #define HID_USAGE_SENSOR_ANGL_VELOCITY_Y_AXIS 0x200458
  39. #define HID_USAGE_SENSOR_ANGL_VELOCITY_Z_AXIS 0x200459
  40. /* Gravity vector */
  41. #define HID_USAGE_SENSOR_GRAVITY_VECTOR 0x20007B
  42. /* ORIENTATION: Compass 3D: (200083) */
  43. #define HID_USAGE_SENSOR_COMPASS_3D 0x200083
  44. #define HID_USAGE_SENSOR_DATA_ORIENTATION 0x200470
  45. #define HID_USAGE_SENSOR_ORIENT_MAGN_HEADING 0x200471
  46. #define HID_USAGE_SENSOR_ORIENT_MAGN_HEADING_X 0x200472
  47. #define HID_USAGE_SENSOR_ORIENT_MAGN_HEADING_Y 0x200473
  48. #define HID_USAGE_SENSOR_ORIENT_MAGN_HEADING_Z 0x200474
  49. #define HID_USAGE_SENSOR_ORIENT_COMP_MAGN_NORTH 0x200475
  50. #define HID_USAGE_SENSOR_ORIENT_COMP_TRUE_NORTH 0x200476
  51. #define HID_USAGE_SENSOR_ORIENT_MAGN_NORTH 0x200477
  52. #define HID_USAGE_SENSOR_ORIENT_TRUE_NORTH 0x200478
  53. #define HID_USAGE_SENSOR_ORIENT_DISTANCE 0x200479
  54. #define HID_USAGE_SENSOR_ORIENT_DISTANCE_X 0x20047A
  55. #define HID_USAGE_SENSOR_ORIENT_DISTANCE_Y 0x20047B
  56. #define HID_USAGE_SENSOR_ORIENT_DISTANCE_Z 0x20047C
  57. #define HID_USAGE_SENSOR_ORIENT_DISTANCE_OUT_OF_RANGE 0x20047D
  58. /* ORIENTATION: Inclinometer 3D: (200086) */
  59. #define HID_USAGE_SENSOR_INCLINOMETER_3D 0x200086
  60. #define HID_USAGE_SENSOR_ORIENT_TILT 0x20047E
  61. #define HID_USAGE_SENSOR_ORIENT_TILT_X 0x20047F
  62. #define HID_USAGE_SENSOR_ORIENT_TILT_Y 0x200480
  63. #define HID_USAGE_SENSOR_ORIENT_TILT_Z 0x200481
  64. #define HID_USAGE_SENSOR_DEVICE_ORIENTATION 0x20008A
  65. #define HID_USAGE_SENSOR_RELATIVE_ORIENTATION 0x20008E
  66. #define HID_USAGE_SENSOR_GEOMAGNETIC_ORIENTATION 0x2000C1
  67. #define HID_USAGE_SENSOR_ORIENT_ROTATION_MATRIX 0x200482
  68. #define HID_USAGE_SENSOR_ORIENT_QUATERNION 0x200483
  69. #define HID_USAGE_SENSOR_ORIENT_MAGN_FLUX 0x200484
  70. #define HID_USAGE_SENSOR_ORIENT_MAGN_FLUX_X_AXIS 0x200485
  71. #define HID_USAGE_SENSOR_ORIENT_MAGN_FLUX_Y_AXIS 0x200486
  72. #define HID_USAGE_SENSOR_ORIENT_MAGN_FLUX_Z_AXIS 0x200487
  73. /* Time (2000a0) */
  74. #define HID_USAGE_SENSOR_TIME 0x2000a0
  75. #define HID_USAGE_SENSOR_TIME_YEAR 0x200521
  76. #define HID_USAGE_SENSOR_TIME_MONTH 0x200522
  77. #define HID_USAGE_SENSOR_TIME_DAY 0x200523
  78. #define HID_USAGE_SENSOR_TIME_HOUR 0x200525
  79. #define HID_USAGE_SENSOR_TIME_MINUTE 0x200526
  80. #define HID_USAGE_SENSOR_TIME_SECOND 0x200527
  81. #define HID_USAGE_SENSOR_TIME_TIMESTAMP 0x200529
  82. /* Units */
  83. #define HID_USAGE_SENSOR_UNITS_NOT_SPECIFIED 0x00
  84. #define HID_USAGE_SENSOR_UNITS_LUX 0x01
  85. #define HID_USAGE_SENSOR_UNITS_KELVIN 0x01000100
  86. #define HID_USAGE_SENSOR_UNITS_FAHRENHEIT 0x03000100
  87. #define HID_USAGE_SENSOR_UNITS_PASCAL 0xF1E1
  88. #define HID_USAGE_SENSOR_UNITS_NEWTON 0x11E1
  89. #define HID_USAGE_SENSOR_UNITS_METERS_PER_SECOND 0x11F0
  90. #define HID_USAGE_SENSOR_UNITS_METERS_PER_SEC_SQRD 0x11E0
  91. #define HID_USAGE_SENSOR_UNITS_FARAD 0xE14F2000
  92. #define HID_USAGE_SENSOR_UNITS_AMPERE 0x01001000
  93. #define HID_USAGE_SENSOR_UNITS_WATT 0x21d1
  94. #define HID_USAGE_SENSOR_UNITS_HENRY 0x21E1E000
  95. #define HID_USAGE_SENSOR_UNITS_OHM 0x21D1E000
  96. #define HID_USAGE_SENSOR_UNITS_VOLT 0x21D1F000
  97. #define HID_USAGE_SENSOR_UNITS_HERTZ 0x01F0
  98. #define HID_USAGE_SENSOR_UNITS_DEGREES_PER_SEC_SQRD 0x14E0
  99. #define HID_USAGE_SENSOR_UNITS_RADIANS 0x12
  100. #define HID_USAGE_SENSOR_UNITS_RADIANS_PER_SECOND 0x12F0
  101. #define HID_USAGE_SENSOR_UNITS_RADIANS_PER_SEC_SQRD 0x12E0
  102. #define HID_USAGE_SENSOR_UNITS_SECOND 0x0110
  103. #define HID_USAGE_SENSOR_UNITS_GAUSS 0x01E1F000
  104. #define HID_USAGE_SENSOR_UNITS_GRAM 0x0101
  105. #define HID_USAGE_SENSOR_UNITS_CENTIMETER 0x11
  106. #define HID_USAGE_SENSOR_UNITS_G 0x1A
  107. #define HID_USAGE_SENSOR_UNITS_MILLISECOND 0x19
  108. #define HID_USAGE_SENSOR_UNITS_PERCENT 0x17
  109. #define HID_USAGE_SENSOR_UNITS_DEGREES 0x14
  110. #define HID_USAGE_SENSOR_UNITS_DEGREES_PER_SECOND 0x15
  111. /* Common selectors */
  112. #define HID_USAGE_SENSOR_PROP_REPORT_INTERVAL 0x20030E
  113. #define HID_USAGE_SENSOR_PROP_SENSITIVITY_ABS 0x20030F
  114. #define HID_USAGE_SENSOR_PROP_SENSITIVITY_RANGE_PCT 0x200310
  115. #define HID_USAGE_SENSOR_PROP_SENSITIVITY_REL_PCT 0x200311
  116. #define HID_USAGE_SENSOR_PROP_ACCURACY 0x200312
  117. #define HID_USAGE_SENSOR_PROP_RESOLUTION 0x200313
  118. #define HID_USAGE_SENSOR_PROP_RANGE_MAXIMUM 0x200314
  119. #define HID_USAGE_SENSOR_PROP_RANGE_MINIMUM 0x200315
  120. #define HID_USAGE_SENSOR_PROP_REPORT_STATE 0x200316
  121. #define HID_USAGE_SENSOR_PROY_POWER_STATE 0x200319
  122. /* Batch mode selectors */
  123. #define HID_USAGE_SENSOR_PROP_REPORT_LATENCY 0x20031B
  124. /* Per data field properties */
  125. #define HID_USAGE_SENSOR_DATA_MOD_NONE 0x00
  126. #define HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_ABS 0x1000
  127. /* Power state enumerations */
  128. #define HID_USAGE_SENSOR_PROP_POWER_STATE_UNDEFINED_ENUM 0x200850
  129. #define HID_USAGE_SENSOR_PROP_POWER_STATE_D0_FULL_POWER_ENUM 0x200851
  130. #define HID_USAGE_SENSOR_PROP_POWER_STATE_D1_LOW_POWER_ENUM 0x200852
  131. #define HID_USAGE_SENSOR_PROP_POWER_STATE_D2_STANDBY_WITH_WAKE_ENUM 0x200853
  132. #define HID_USAGE_SENSOR_PROP_POWER_STATE_D3_SLEEP_WITH_WAKE_ENUM 0x200854
  133. #define HID_USAGE_SENSOR_PROP_POWER_STATE_D4_POWER_OFF_ENUM 0x200855
  134. /* Report State enumerations */
  135. #define HID_USAGE_SENSOR_PROP_REPORTING_STATE_NO_EVENTS_ENUM 0x200840
  136. #define HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM 0x200841
  137. #endif