Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * HID Sensors Driver
0004  * Copyright (c) 2012, Intel Corporation.
0005  */
0006 #ifndef _HID_SENSORS_IDS_H
0007 #define _HID_SENSORS_IDS_H
0008 
0009 #define HID_MAX_PHY_DEVICES                 0xFF
0010 
0011 #define HID_USAGE_SENSOR_COLLECTION             0x200001
0012 
0013 /* Accel 3D (200073) */
0014 #define HID_USAGE_SENSOR_ACCEL_3D               0x200073
0015 #define HID_USAGE_SENSOR_DATA_ACCELERATION          0x200452
0016 #define HID_USAGE_SENSOR_ACCEL_X_AXIS               0x200453
0017 #define HID_USAGE_SENSOR_ACCEL_Y_AXIS               0x200454
0018 #define HID_USAGE_SENSOR_ACCEL_Z_AXIS               0x200455
0019 
0020 /* ALS (200041) */
0021 #define HID_USAGE_SENSOR_ALS                    0x200041
0022 #define HID_USAGE_SENSOR_DATA_LIGHT             0x2004d0
0023 #define HID_USAGE_SENSOR_LIGHT_ILLUM                0x2004d1
0024 
0025 /* PROX (200011) */
0026 #define HID_USAGE_SENSOR_PROX                                   0x200011
0027 #define HID_USAGE_SENSOR_DATA_PRESENCE                          0x2004b0
0028 #define HID_USAGE_SENSOR_HUMAN_PRESENCE                         0x2004b1
0029 
0030 /* Pressure (200031) */
0031 #define HID_USAGE_SENSOR_PRESSURE                               0x200031
0032 #define HID_USAGE_SENSOR_DATA_ATMOSPHERIC_PRESSURE              0x200430
0033 #define HID_USAGE_SENSOR_ATMOSPHERIC_PRESSURE                   0x200431
0034 
0035 /* Tempreture (200033) */
0036 #define HID_USAGE_SENSOR_TEMPERATURE                0x200033
0037 #define HID_USAGE_SENSOR_DATA_ENVIRONMENTAL_TEMPERATURE     0x200434
0038 
0039 /* humidity */
0040 #define HID_USAGE_SENSOR_HUMIDITY                              0x200032
0041 #define HID_USAGE_SENSOR_ATMOSPHERIC_HUMIDITY                  0x200433
0042 
0043 /* Gyro 3D: (200076) */
0044 #define HID_USAGE_SENSOR_GYRO_3D                0x200076
0045 #define HID_USAGE_SENSOR_DATA_ANGL_VELOCITY         0x200456
0046 #define HID_USAGE_SENSOR_ANGL_VELOCITY_X_AXIS           0x200457
0047 #define HID_USAGE_SENSOR_ANGL_VELOCITY_Y_AXIS           0x200458
0048 #define HID_USAGE_SENSOR_ANGL_VELOCITY_Z_AXIS           0x200459
0049 
0050 /* Gravity vector */
0051 #define HID_USAGE_SENSOR_GRAVITY_VECTOR             0x20007B
0052 
0053 /* ORIENTATION: Compass 3D: (200083) */
0054 #define HID_USAGE_SENSOR_COMPASS_3D             0x200083
0055 #define HID_USAGE_SENSOR_DATA_ORIENTATION           0x200470
0056 #define HID_USAGE_SENSOR_ORIENT_MAGN_HEADING            0x200471
0057 #define HID_USAGE_SENSOR_ORIENT_MAGN_HEADING_X          0x200472
0058 #define HID_USAGE_SENSOR_ORIENT_MAGN_HEADING_Y          0x200473
0059 #define HID_USAGE_SENSOR_ORIENT_MAGN_HEADING_Z          0x200474
0060 
0061 #define HID_USAGE_SENSOR_ORIENT_COMP_MAGN_NORTH         0x200475
0062 #define HID_USAGE_SENSOR_ORIENT_COMP_TRUE_NORTH         0x200476
0063 #define HID_USAGE_SENSOR_ORIENT_MAGN_NORTH          0x200477
0064 #define HID_USAGE_SENSOR_ORIENT_TRUE_NORTH          0x200478
0065 
0066 #define HID_USAGE_SENSOR_ORIENT_DISTANCE            0x200479
0067 #define HID_USAGE_SENSOR_ORIENT_DISTANCE_X          0x20047A
0068 #define HID_USAGE_SENSOR_ORIENT_DISTANCE_Y          0x20047B
0069 #define HID_USAGE_SENSOR_ORIENT_DISTANCE_Z          0x20047C
0070 #define HID_USAGE_SENSOR_ORIENT_DISTANCE_OUT_OF_RANGE       0x20047D
0071 
0072 /* ORIENTATION: Inclinometer 3D: (200086) */
0073 #define HID_USAGE_SENSOR_INCLINOMETER_3D            0x200086
0074 #define HID_USAGE_SENSOR_ORIENT_TILT                0x20047E
0075 #define HID_USAGE_SENSOR_ORIENT_TILT_X              0x20047F
0076 #define HID_USAGE_SENSOR_ORIENT_TILT_Y              0x200480
0077 #define HID_USAGE_SENSOR_ORIENT_TILT_Z              0x200481
0078 
0079 #define HID_USAGE_SENSOR_DEVICE_ORIENTATION         0x20008A
0080 #define HID_USAGE_SENSOR_RELATIVE_ORIENTATION           0x20008E
0081 #define HID_USAGE_SENSOR_GEOMAGNETIC_ORIENTATION        0x2000C1
0082 #define HID_USAGE_SENSOR_ORIENT_ROTATION_MATRIX         0x200482
0083 #define HID_USAGE_SENSOR_ORIENT_QUATERNION          0x200483
0084 #define HID_USAGE_SENSOR_ORIENT_MAGN_FLUX           0x200484
0085 
0086 #define HID_USAGE_SENSOR_ORIENT_MAGN_FLUX_X_AXIS        0x200485
0087 #define HID_USAGE_SENSOR_ORIENT_MAGN_FLUX_Y_AXIS        0x200486
0088 #define HID_USAGE_SENSOR_ORIENT_MAGN_FLUX_Z_AXIS        0x200487
0089 
0090 /* Time (2000a0) */
0091 #define HID_USAGE_SENSOR_TIME                   0x2000a0
0092 #define HID_USAGE_SENSOR_TIME_YEAR              0x200521
0093 #define HID_USAGE_SENSOR_TIME_MONTH             0x200522
0094 #define HID_USAGE_SENSOR_TIME_DAY               0x200523
0095 #define HID_USAGE_SENSOR_TIME_HOUR              0x200525
0096 #define HID_USAGE_SENSOR_TIME_MINUTE                0x200526
0097 #define HID_USAGE_SENSOR_TIME_SECOND                0x200527
0098 #define HID_USAGE_SENSOR_TIME_TIMESTAMP             0x200529
0099 
0100 /* Units */
0101 #define HID_USAGE_SENSOR_UNITS_NOT_SPECIFIED            0x00
0102 #define HID_USAGE_SENSOR_UNITS_LUX              0x01
0103 #define HID_USAGE_SENSOR_UNITS_KELVIN               0x01000100
0104 #define HID_USAGE_SENSOR_UNITS_FAHRENHEIT           0x03000100
0105 #define HID_USAGE_SENSOR_UNITS_PASCAL               0xF1E1
0106 #define HID_USAGE_SENSOR_UNITS_NEWTON               0x11E1
0107 #define HID_USAGE_SENSOR_UNITS_METERS_PER_SECOND        0x11F0
0108 #define HID_USAGE_SENSOR_UNITS_METERS_PER_SEC_SQRD      0x11E0
0109 #define HID_USAGE_SENSOR_UNITS_FARAD                0xE14F2000
0110 #define HID_USAGE_SENSOR_UNITS_AMPERE               0x01001000
0111 #define HID_USAGE_SENSOR_UNITS_WATT             0x21d1
0112 #define HID_USAGE_SENSOR_UNITS_HENRY                0x21E1E000
0113 #define HID_USAGE_SENSOR_UNITS_OHM              0x21D1E000
0114 #define HID_USAGE_SENSOR_UNITS_VOLT             0x21D1F000
0115 #define HID_USAGE_SENSOR_UNITS_HERTZ                0x01F0
0116 #define HID_USAGE_SENSOR_UNITS_DEGREES_PER_SEC_SQRD     0x14E0
0117 #define HID_USAGE_SENSOR_UNITS_RADIANS              0x12
0118 #define HID_USAGE_SENSOR_UNITS_RADIANS_PER_SECOND       0x12F0
0119 #define HID_USAGE_SENSOR_UNITS_RADIANS_PER_SEC_SQRD     0x12E0
0120 #define HID_USAGE_SENSOR_UNITS_SECOND               0x0110
0121 #define HID_USAGE_SENSOR_UNITS_GAUSS                0x01E1F000
0122 #define HID_USAGE_SENSOR_UNITS_GRAM             0x0101
0123 #define HID_USAGE_SENSOR_UNITS_CENTIMETER           0x11
0124 #define HID_USAGE_SENSOR_UNITS_G                0x1A
0125 #define HID_USAGE_SENSOR_UNITS_MILLISECOND          0x19
0126 #define HID_USAGE_SENSOR_UNITS_PERCENT              0x17
0127 #define HID_USAGE_SENSOR_UNITS_DEGREES              0x14
0128 #define HID_USAGE_SENSOR_UNITS_DEGREES_PER_SECOND       0x15
0129 
0130 /* Common selectors */
0131 #define HID_USAGE_SENSOR_PROP_DESC              0x200300
0132 #define HID_USAGE_SENSOR_PROP_FRIENDLY_NAME         0x200301
0133 #define HID_USAGE_SENSOR_PROP_SERIAL_NUM            0x200307
0134 #define HID_USAGE_SENSOR_PROP_MANUFACTURER          0x200305
0135 #define HID_USAGE_SENSOR_PROP_REPORT_INTERVAL           0x20030E
0136 #define HID_USAGE_SENSOR_PROP_SENSITIVITY_ABS           0x20030F
0137 #define HID_USAGE_SENSOR_PROP_SENSITIVITY_RANGE_PCT     0x200310
0138 #define HID_USAGE_SENSOR_PROP_SENSITIVITY_REL_PCT       0x200311
0139 #define HID_USAGE_SENSOR_PROP_ACCURACY              0x200312
0140 #define HID_USAGE_SENSOR_PROP_RESOLUTION            0x200313
0141 #define HID_USAGE_SENSOR_PROP_RANGE_MAXIMUM         0x200314
0142 #define HID_USAGE_SENSOR_PROP_RANGE_MINIMUM         0x200315
0143 #define HID_USAGE_SENSOR_PROP_REPORT_STATE          0x200316
0144 #define HID_USAGE_SENSOR_PROY_POWER_STATE           0x200319
0145 
0146 /* Batch mode selectors */
0147 #define HID_USAGE_SENSOR_PROP_REPORT_LATENCY            0x20031B
0148 
0149 /* Per data field properties */
0150 #define HID_USAGE_SENSOR_DATA_MOD_NONE                  0x00
0151 #define HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_ABS        0x1000
0152 #define HID_USAGE_SENSOR_DATA_MOD_CHANGE_SENSITIVITY_REL_PCT            0xE000
0153 
0154 /* Power state enumerations */
0155 #define HID_USAGE_SENSOR_PROP_POWER_STATE_UNDEFINED_ENUM    0x200850
0156 #define HID_USAGE_SENSOR_PROP_POWER_STATE_D0_FULL_POWER_ENUM    0x200851
0157 #define HID_USAGE_SENSOR_PROP_POWER_STATE_D1_LOW_POWER_ENUM 0x200852
0158 #define HID_USAGE_SENSOR_PROP_POWER_STATE_D2_STANDBY_WITH_WAKE_ENUM 0x200853
0159 #define HID_USAGE_SENSOR_PROP_POWER_STATE_D3_SLEEP_WITH_WAKE_ENUM 0x200854
0160 #define HID_USAGE_SENSOR_PROP_POWER_STATE_D4_POWER_OFF_ENUM 0x200855
0161 
0162 /* Report State enumerations */
0163 #define HID_USAGE_SENSOR_PROP_REPORTING_STATE_NO_EVENTS_ENUM    0x200840
0164 #define HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM   0x200841
0165 
0166 /* Custom Sensor (2000e1) */
0167 #define HID_USAGE_SENSOR_HINGE                      0x20020B
0168 #define HID_USAGE_SENSOR_DATA_FIELD_LOCATION            0x200400
0169 #define HID_USAGE_SENSOR_DATA_FIELE_TIME_SINCE_SYS_BOOT     0x20052B
0170 #define HID_USAGE_SENSOR_DATA_FIELD_CUSTOM_USAGE        0x200541
0171 #define HID_USAGE_SENSOR_DATA_FIELD_CUSTOM_VALUE_BASE           0x200543
0172 /* Custom Sensor data 28=>x>=0 */
0173 #define HID_USAGE_SENSOR_DATA_FIELD_CUSTOM_VALUE(x)                            \
0174     (HID_USAGE_SENSOR_DATA_FIELD_CUSTOM_VALUE_BASE + (x))
0175 
0176 #endif