OSDN Git Service

Winter cleanup: comment harmonization, space shuffling, etc.
[android-x86/hardware-intel-libsensors.git] / common.h
index bbccae3..3a2da16 100644 (file)
--- a/common.h
+++ b/common.h
@@ -133,7 +133,7 @@ struct sensor_info_t
        const char* selected_trigger;
 
        float offset;   /* (cooked = raw + offset) * scale */
-       float scale;    /*default: 1. when set to 0, use channel specific value*/
+       float scale;    /*default:1. when set to 0, use channel specific value*/
        float illumincalib;     /* to set the calibration for the ALS */
 
        float requested_rate;   /* requested events / second */
@@ -167,7 +167,7 @@ struct sensor_info_t
        /*
         * This flag is set if we have a meta data event pending
         */
-       volatile int meta_data_pending;
+       int meta_data_pending;
 
        /*
         * Timestamp closely matching the date of sampling, preferably retrieved
@@ -183,13 +183,18 @@ struct sensor_info_t
        /* Whether or not the above buffer contains data from a device report */
        int report_initialized;
 
+       /* Channel and sample finalization callbacks for this sensor */
        struct sample_ops_t ops;
 
        int cal_level; /* 0 means not calibrated */
 
-       /* Depending on the sensor calibration may take too much at higher levels */
+       /*
+        * 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;
+
+       void *cal_data; /* Sensor calibration data, e.g. for magnetometer */
 
        /* Filtering data for noisy sensors */
        void* filter;