OSDN Git Service

GMINL-7944: Add quirks for disabling data acquisition methods
[android-x86/hardware-intel-libsensors.git] / description.h
1 /*
2  * Copyright (C) 2014-2015 Intel Corporation.
3  */
4
5 #ifndef __DESCRIPTION_H__
6 #define __DESCRIPTION_H__
7
8 #include "common.h"
9
10 #define QUIRK_ALREADY_DECODED   0x01  /* Sensor quirks have been read         */
11 #define QUIRK_INITIAL_RATE      0x02  /* Force initial sensor sampling rate   */
12 #define QUIRK_FIELD_ORDERING    0x04  /* Do field remapping for this sensor   */
13 #define QUIRK_TERSE_DRIVER      0x08  /* Force duplicate events generation    */
14 #define QUIRK_NOISY             0x10  /* High noise level on readings         */
15 #define QUIRK_FORCE_CONTINUOUS  0x20  /* Force usage of continuous trigger    */
16 #define QUIRK_BIASED            0x40  /* Biased sensor, requires compensation */
17 #define QUIRK_SPOTTY            0x80  /* Driver may lose events               */
18 #define QUIRK_NO_EVENT_MODE     0x100 /* Disable event mode                   */
19 #define QUIRK_NO_TRIG_MODE      0x200 /* Disable trigger mode                 */
20 #define QUIRK_NO_POLL_MODE      0x400 /* Disable poll mode                    */
21
22 #ifdef __LP64__
23         typedef uint64_t        flag_t;
24         typedef int64_t         max_delay_t;
25 #else
26         typedef uint32_t        flag_t;
27         typedef int32_t         max_delay_t;
28 #endif
29
30 char*           sensor_get_name         (int s);
31 char*           sensor_get_vendor       (int s);
32 int             sensor_get_version      (int s);
33 float           sensor_get_max_range    (int s);
34 float           sensor_get_resolution   (int s);
35 float           sensor_get_power        (int s);
36 flag_t          sensor_get_flags        (int s);
37 int32_t         sensor_get_min_delay    (int s);
38 max_delay_t     sensor_get_max_delay    (int s);
39 float           sensor_get_illumincalib (int s);
40 uint32_t        sensor_get_quirks       (int s);
41 int             sensor_get_prop         (int s, const char* sel, int* val);
42 int             sensor_get_fl_prop      (int s, const char* sel, float* val);
43 int             sensor_get_order        (int s,unsigned char map[MAX_CHANNELS]);
44 int             sensor_get_cal_steps    (int s);
45 char*           sensor_get_string_type  (int s);
46 int             sensor_get_st_prop      (int s, const char* sel, char val[MAX_NAME_SIZE]);
47
48 #endif