Linux IIO development
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Philippe De Muyter <phdm@macq.eu>
Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
	jic23@kernel.org, linux-iio@vger.kernel.org
Subject: Re: [PATCH] iio: imu: st_lsm6dsx: no answer after some iio_generic_buffer test cycles
Date: Mon, 13 Feb 2023 11:53:24 +0100	[thread overview]
Message-ID: <Y+oWpKubqhgvCOVx@lore-desk> (raw)
In-Reply-To: <20230213101654.GA5438@frolo.macqel>

[-- Attachment #1: Type: text/plain, Size: 2438 bytes --]

> Hello Lorenzo,

Hi Philippe,

> 
> On Mon, Feb 13, 2023 at 10:19:57AM +0100, Philippe De Muyter wrote:
> > I have a 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.
> 
> Here is the way I test :
> 
>  # iio/lsiio 
>  Device 001: ism330dlc_gyro
>  Device 002: ism330dlc_accel
>  Device 000: ina3221x
>  # for axis in x y z; do echo 1 >/sys/bus/iio/devices/iio\:device1/scan_elements/in_anglvel_${axis}_en; done
>  # echo 416 > /sys/bus/iio/devices/iio\:device1/sampling_frequency
>  # while true; do  sudo iio/iio_generic_buffer -n ism330dlc_gyro -g -c 6 -a; sleep 2; done
>  iio device number being used is 1
>  trigger-less mode selected
>  Auto-channels selected but some channels are already activated in sysfs
>  Proceeding without activating any channels
>  0.002291 -0.073762 0.033139 
>  0.003971 -0.075289 0.035583 
>  0.003971 -0.076969 0.036194 
>  0.004123 -0.074220 0.037110 
>  0.003207 -0.074678 0.034667 
>  0.002596 -0.073456 0.035277 
>  iio device number being used is 1
>  trigger-less mode selected
>  Auto-channels selected but some channels are already activated in sysfs
>  Proceeding without activating any channels
>  0.002138 -0.074067 0.034819 
>  0.003512 -0.075442 0.034819 
>  0.001985 -0.074373 0.035430 
>  0.002902 -0.074373 0.035888 
>  0.002138 -0.074220 0.036346 
>  0.003360 -0.076053 0.035277
> 
> After a quick time, iio_generic_buffer gets blocked in the poll syscall.

are you running level or edge interrupts? If you are using edge ones can you
please check your kernel has the following fix?

commit 3f9bce7a22a3f8ac9d885c9d75bc45569f24ac8b
Author: Lorenzo Bianconi <lorenzo@kernel.org>
Date:   Sat Nov 14 19:39:05 2020 +0100

    iio: imu: st_lsm6dsx: fix edge-trigger interrupts

> Hitting 'CTRL-C' kills the iio_generic_buffer process, and the next one
> then receives values.
> 
> This happens with both gyro and accel.
> 
> Do you encounter the same problem ?
> 
> My kernel is actually a 4.9 one with a backport of iio core infrastructure
> and iio/imu/st_lsm6dsx of 6.2, but I could have missed something important.

Are you able to test with an upstream kernel?

Regards,
Lorenzo

> 
> Best regards
> 
> Philippe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-02-13 10:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 14:42 [PATCH] iio: imu: st_lsm6dsx: discard samples during filters settling time Lorenzo Bianconi
2023-02-08 16:23 ` Philippe De Muyter
2023-02-08 16:34   ` Lorenzo Bianconi
2023-02-08 17:15     ` Philippe De Muyter
2023-02-08 17:28       ` Lorenzo Bianconi
2023-02-12 10:21 ` Lorenzo Bianconi
2023-02-13  9:19   ` Philippe De Muyter
2023-02-13 10:16     ` [PATCH] iio: imu: st_lsm6dsx: no answer after some iio_generic_buffer test cycles Philippe De Muyter
2023-02-13 10:53       ` Lorenzo Bianconi [this message]
2023-02-14  9:42         ` Philippe De Muyter
2023-02-18 13:56 ` [PATCH] iio: imu: st_lsm6dsx: discard samples during filters settling time Jonathan Cameron
2023-02-20  9:12   ` Lorenzo Bianconi
2023-02-20 11:28     ` Philippe De Muyter
2023-02-20 11:31       ` Lorenzo Bianconi
2023-02-20 12:41     ` Jonathan Cameron
2023-02-20 13:07       ` Lorenzo Bianconi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y+oWpKubqhgvCOVx@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=phdm@macq.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox