From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE5F2C433E0 for ; Tue, 2 Jun 2020 13:39:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BACFA20757 for ; Tue, 2 Jun 2020 13:39:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=geanix.com header.i=@geanix.com header.b="jTO8+la6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727032AbgFBNjP (ORCPT ); Tue, 2 Jun 2020 09:39:15 -0400 Received: from first.geanix.com ([116.203.34.67]:55816 "EHLO first.geanix.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725958AbgFBNjP (ORCPT ); Tue, 2 Jun 2020 09:39:15 -0400 Received: from [192.168.64.147] (unknown [85.191.123.149]) by first.geanix.com (Postfix) with ESMTPSA id 972EC20C0A1C; Tue, 2 Jun 2020 13:39:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=geanix.com; s=first; t=1591105152; bh=gr6DXtNuaamDCNqNtayKiIWVL51hke69JV5atEVP3AA=; h=Subject:From:To:Cc:References:Date:In-Reply-To; b=jTO8+la6uWtzf3542kA0UoNSKHxnJTMF1vVGszB0JtHJYm1D055QH9YOGY7kwWE1v zDOsoZMnsP/OOEtN/seUPEKJlNuDgvKxVl1gtrue2LmMTjO7Qs3Tj1xDjgqFWERMLX 3HBRQIa9k+MMSKk4WefA8UOP1GX/Y9CXrSeAyqPjGuwE8CTsQvU1DhDeQUT1cP95XJ mrj3NWM+5XFuv/aX8+KHA5PJ7vyefQAk8Hr7A2iEp/IR1zNUW0FxsdnNKbYI/YONvO CwaUqUlI9WKROMS5qrmqtpvAha5plICNhhnnx+5fwMVQQhjKa8qL08cGvsqor0dctU /vEv2hnmMsaUg== Subject: Re: IIO timestamp get skewed when suspending (st_lsm6dsx) From: Sean Nyekjaer To: Lorenzo Bianconi Cc: linux-iio , Jonathan Cameron References: <54cb146d-e54e-acae-e89c-075521b8e7dc@geanix.com> <20200528210711.GD5419@localhost.localdomain> <3c629741-43f1-3d3a-2b40-40ddfd773e86@geanix.com> <20200529074443.GA3198@localhost.localdomain> <5bb0fca9-97a4-4bad-1314-1f275ab632ff@geanix.com> <20200529085052.GC3198@localhost.localdomain> <08c824c2-dfb2-7a5c-b6fd-8258d6ce3808@geanix.com> <20200529121616.GD3198@localhost.localdomain> <26401237-5e3b-faf7-35c7-9d6e22f6d239@geanix.com> Message-ID: Date: Tue, 2 Jun 2020 15:39:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 MIME-Version: 1.0 In-Reply-To: <26401237-5e3b-faf7-35c7-9d6e22f6d239@geanix.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US-large Content-Transfer-Encoding: 7bit Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org >> 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