STMicroelectronics / st-mems-android-linux-drivers-iio

stm mems iio drivers for Android and Linux platforms.
GNU General Public License v2.0
23 stars 1 forks source link

lsm9ds1 (st_imu68) irq not triggered on data ready #1

Closed pengus77 closed 1 year ago

pengus77 commented 2 years ago

Hi, we're using an lsm9ds1 on an Android 10 board with kernel 5.4 and, while the in-kernel magnetormeter driver works correctly and the HAL receives the correct data when an irq is raised, the accel/gyro section doesn't seem to work in the same way. We tried the older driver and this new one to the same result. The triggers are setup correctly and the data readings from sysfs (eg: in_accel_x_raw) return sane values readings via i2c, but no irq is raised at all when the device is moved or rotated. We've tried setting the irq type in the dt as low/high/rising/falling (and related changes in the driver) to no visible results. When we force enable the data-ready irq via i2cset (eg: "i2cset -y -f 2 0x6a 0x0c 0x3" to enable both data-ready for accel/gyro on the 1st irq line), we see the interrupts coming in /proc/interrupts, but no data is received from the HAL (we're using the android hal provided here: https://github.com/STMicroelectronics/st-mems-android-linux-sensors-hal). No changes have been done to the driver itself and all sensors show up in Aida64, including the iNemo virtual sensors, but no data is received. Any idea what could be going on or if we're missing something ? We've been fighting with this issue for the last week...

Edit: we also tried with the IIO HAL (https://github.com/STMicroelectronics/STMems_Android_Sensor_HAL_IIO) and the result is the same. Magnetometer works fine, accel / gyro are silent.

mariotesi commented 1 year ago

It should have been fixed in this commit: https://github.com/STMicroelectronics/st-mems-android-linux-drivers-iio/commit/6efdd6545395a513d43c6b661d1d3d865a81e791