+ /* Whether or not the above buffer contains data from a device report */
+ int report_initialized;
+
+ /* Channel and sample finalization callbacks for this sensor */
+ sample_ops_t ops;
+
+ int cal_level; /* 0 means not calibrated */
+
+ /*
+ * Depending on the sensor, calibration may take too much time at higher levels. Allow optional capping to a certain level.
+ */
+ int max_cal_level;
+
+ void *cal_data; /* Sensor calibration data, e.g. for magnetometer */
+
+ void* filter; /* Filtering data for noisy sensors */
+ int filter_type;/* FILTER_ specification for this sensor ; default is FILTER_NONE */
+
+ /* Previously reported value, for on-change sensors */
+ union {
+ float data;
+ uint64_t data64;
+ } prev_val;
+ /*
+ * Certain sensors expose their readings through sysfs files that have a long response time (100-200 ms for ALS). Rather than block our
+ * global control loop for several hundred ms each second, offload those lengthy blocking reads to dedicated threads, which will then report
+ * their data through a fd that we can add to our poll fd set.
+ */
+ int thread_data_fd[2];
+ pthread_t acquisition_thread;
+
+ int base_count; /* How many base sensors is the sensor depending on */
+ int base[MAX_SENSOR_BASES];
+
+ uint32_t quirks; /* Bit mask expressing the need for special tweaks */
+