Re: [PATCH] iio: imu: st_lsm6dsx: no answer after some iio_generic_buffer test cycles

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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@xxxxxxxxxx>
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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux