On 02/06/2020 15.39, Sean Nyekjaer wrote:
are these values from the hw FIFO? can you please add sensor->ts_ref
to the trace and
a log into st_lsm6dsx_reset_hw_ts?
Hi,
This certainly looks weird,
https://gist.github.com/sknsean/b32bae140008cf446a8fea58e305da47
Seems like the ts_ref is updated and used but not read/used in
userspace...
/Sean
added to st_lsm6dsx_read_fifo :
printk("ts_ref %lld, ts %lld, sample_time %lld\n", acc_sensor->ts_ref,
ts, acc_sensor->ts_ref + ts);
https://gist.github.com/sknsean/3ad1e9e05cb0e2ef811a3c83492a1980
Suspend again was 15sec
/Sean
Hi,
Some more findings :)
https://gist.github.com/sknsean/d31e48b65515361309cd238dcf68600f
To me it looks like ktime_get_real_ns() isn't ready or updated when we
are calling iio_get_time_ns().
If we look in the trace ktime_get_real_ns() it's ready when we are
getting the first sample after suspend.
Running with this patch:
https://gist.github.com/sknsean/415d1b9c34f20db4419a0c61a58eb188
+
The first from this thread.
/Sean