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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6011FC636CC for ; Mon, 13 Feb 2023 09:20:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229863AbjBMJUC (ORCPT ); Mon, 13 Feb 2023 04:20:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229552AbjBMJUC (ORCPT ); Mon, 13 Feb 2023 04:20:02 -0500 Received: from frolo.macqel.be (smtp2.macqel.be [109.135.2.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 797DCEB66 for ; Mon, 13 Feb 2023 01:20:00 -0800 (PST) Received: by frolo.macqel.be (Postfix, from userid 1000) id EBA54DF00A8; Mon, 13 Feb 2023 10:19:57 +0100 (CET) Date: Mon, 13 Feb 2023 10:19:57 +0100 From: Philippe De Muyter To: Lorenzo Bianconi Cc: Lorenzo Bianconi , jic23@kernel.org, linux-iio@vger.kernel.org Subject: Re: [PATCH] iio: imu: st_lsm6dsx: discard samples during filters settling time Message-ID: <20230213091957.GA4925@frolo.macqel> References: <1228b9ed2060b99d0df0f5549a37c8b520ea5429.1675867224.git.lorenzo@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Hello Lorenzo, On Sun, Feb 12, 2023 at 11:21:32AM +0100, Lorenzo Bianconi wrote: > Date: Sun, 12 Feb 2023 11:21:32 +0100 > From: Lorenzo Bianconi > To: Lorenzo Bianconi > Cc: jic23@kernel.org, phdm@macq.eu, linux-iio@vger.kernel.org > Subject: Re: [PATCH] iio: imu: st_lsm6dsx: discard samples during filters > settling time > > > During digital filters settling time the driver is expected to drop > > samples since they can be corrupted. Introduce the capability to drop > > a given number of samples according to the configured ODR. > > Add the sample_to_discard data for LSM6DSM sensor. > > > > Signed-off-by: Lorenzo Bianconi > > --- > > drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 11 ++++ > > .../iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 58 +++++++++++++++---- > > drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c | 18 ++++++ > > 3 files changed, 77 insertions(+), 10 deletions(-) > > I forgot to say I tested this patch on my LSM6DSM and it works fine for me. > > Regards, > Lorenzo > It works fine for me too, with a ism330dlc. Reported-by: Philippe De Muyter Tested-by: Philippe De Muyter However I have another bug, with our without the patch : frequently my test, using a loop around iio-generic-buffer, blocks on the poll syscall. No value comes anymore. This happens both with the gyro as with the accel component. More info follows. Best regards Philippe