cancel
Showing results for 
Search instead for 
Did you mean: 

Integration Issue with LSM6DSVX IMU Sensor HAL on Android 10 (i.MX Processor

We observe mutually exclusive behavior in the LSM6DSVX driver:

  1. With interrupts DISABLED:

    • Can successfully read raw values via sysfs:

       
      cat /sys/bus/iio/devices/iio:deviceX/in_accel_x_raw  # Returns valid data
  2. With interrupts ENABLED:

    • Sysfs reads return 0:

       
       
      cat /sys/bus/iio/devices/iio:deviceX/in_accel_x_raw  # Returns 0
    • Kernel driver appears functional (interrupts fire in dmesg)

    • HAL receives flush events but no sensor data

Debugging Performed:

  • Confirmed IIO buffer configuration:

     
     
    echo 1 > /sys/bus/iio/devices/iio:deviceX/buffer/enable
  • Verified no resource conflicts (lsof /dev/iio:device*)

  • Tested with/without FIFO mode - same behavior

Suspected Root Cause:
Driver may be locking out sysfs reads when interrupts are active, or buffer ownership isn't properly shared between interrupt and sysfs access modes.

Request:
Could you clarify:

  1. Is this expected behavior in the LSM6DSVX driver?

  2. Recommended workaround to allow both interrupt-driven AND sysfs access?

  3. Any known patches or configuration flags to resolve this?

Additional Context:

  • Kernel: ______

  • HAL: android.hardware.sensors@2.0 (ST implementation)

  • Platform: i.MX8MM

0 REPLIES 0