CHROMIUM: iio: cros_ec: Do not cross-batch spread without tight timestamps

Boards which do not have tight_timestamp set to true never fill in
the batch timestamp and length as they use a legacy version of the
spreading code that does not make use of these attributes.

For these boards, trying to set up cross-batch spreading will result in
no spreading happening, but the sample's timestamp will be zeroed out
which is incorrect and will not be fixed anywhere else in the pipeline.

In turn, this can lead to CTS failures in some circumstances.
This patch avoids this issue by not trying to check for past timestamps
if tight_timestamps is not set to true.

BUG=b:120403642, b:120097505
TEST=CTS sensor tests pass on Soraka

Change-Id: Ia4547093b7b4471992fcbdde44b87f51bc8ed3e7
Signed-off-by: Enrico Granata <egranata@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1389076
Commit-Ready: Alexandru M Stan <amstan@chromium.org>
Tested-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
(cherry picked from commit ddad6310e1b34fe045ca213a9365fbd683c7e100)
Reviewed-on: https://chromium-review.googlesource.com/c/1399242
1 file changed