I'd like to pass the timestamps we get from the iio channel unmodified
and without covering up potential issues. As much as possible.
Change-Id: I12303cec2d333638ef037dbf9c95318c0ec5461e
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
int s;
for (s=0; s<MAX_SENSORS; s++)
- if (sensor[s].dev_num == dev_num && is_enabled(s) && sensor[s].mode != MODE_POLL)
- set_report_ts(s, ts);
+ if (sensor[s].dev_num == dev_num && is_enabled(s) && sensor[s].mode != MODE_POLL) {
+ if (sensor[s].quirks & QUIRK_SPOTTY)
+ set_report_ts(s, ts);
+ else
+ sensor[s].report_ts = ts;
+ }
}
if (strstr(quirks_buf, "biased"))
sensor[s].quirks |= QUIRK_BIASED;
+ if (strstr(quirks_buf, "spotty"))
+ sensor[s].quirks |= QUIRK_SPOTTY;
+
sensor[s].quirks |= QUIRK_ALREADY_DECODED;
}
#define QUIRK_NOISY 0x10 /* High noise level on readings */
#define QUIRK_FORCE_CONTINUOUS 0x20 /* Force usage of continuous trigger */
#define QUIRK_BIASED 0x40 /* Biased sensor, requires compensation */
+#define QUIRK_SPOTTY 0x80 /* Driver may lose events */
#ifdef __LP64__
typedef uint64_t flag_t;