+static float sensor_get_min_freq (int s)
+{
+ /*
+ * Check if a low cap has been specified for this sensor sampling rate.
+ * In some case, even when the driver supports lower rate, we still
+ * wish to receive a certain number of samples per seconds for various
+ * reasons (calibration, filtering, no change in power consumption...).
+ */
+
+ float min_freq;
+
+ if (!sensor_get_fl_prop(s, "min_freq", &min_freq))
+ return min_freq;
+
+ return 0;
+}
+
+
+static float sensor_get_max_freq (int s)
+{
+ float max_freq;
+
+ if (!sensor_get_fl_prop(s, "max_freq", &max_freq))
+ return max_freq;
+
+ return ANDROID_MAX_FREQ;
+}
+
+int sensor_get_cal_steps (int s)
+{
+ int cal_steps;
+ if (!sensor_get_prop(s, "cal_steps", &cal_steps))
+ return cal_steps;
+
+ return 0;
+}