2022-08-31 08:06 AM
We are trying to use lsm6dso32 accelerometer/gyroscope connected to a custom hardware (non-st) via i2c. What we want to achieve is reading measured values continuously, ideally via libiio (buffered).
We are building a custom linux (kernel version 5.4) via yocto for our board and integrated this driver for lsm6dso32 support into it: github.com/torvalds/linux/tree/master/drivers/iio/imu/st_lsm6dsx.
Question 1:
Is the driver integrated in the kernel sources the same one, ST is providing here?
github.com/STMicroelectronics/STMems_Standard_C_drivers
Question 2:
If we are using the driver st_lsm6dsx from kernel sources, do we still have to apply the changes stated out here?
github.com/STMicroelectronics/STMems_Linux_IIO_drivers
So would we have to patch include/uapi/linux/iio/types.h to add custom events, for example, to be able to read data?
Question3:
Ideally, we would like to use libiio to read lsm6dso32 data. We are currently failing to do so because enabling iio devices for gyro and accelerometer is not possible and creating a buffer fails (respective libiio docs: analogdevicesinc.github.io/libiio/v0.19/index.html). We do see sysfs nodes/folders for accelerometer and gyro in /sys/bus/iio/devices/, but within their device folders, there are no scan_elements or buffer folders. Is it even possible to use libiio to read lsm6dso32 data? Did anybody else tried the same and could provide some informations/example code/configuration? Or do we have to use and adapt c code provided here instead of libiio?
github.com/STMicroelectronics/STMems_Standard_C_drivers/tree/master/lsm6dso32_STdC/examples
Any help would be very much appreciated.
(sorry, had to remove protocol prefix from all my links, because seems like, I am not allowed to add links to my post/question...)
2022-09-01 12:38 AM
Added this issue in github to increase attention: github.com/STMicroelectronics/STMems_Linux_IIO_drivers/issues/15
2022-09-01 08:20 AM
Hi @NKuhn.1 ,
right, I believe that the best solution is to open an issue directly on Github.
Let me know if you get an answer there
-Eleon
2022-09-01 08:40 AM
Just for clarification: The issue I opened is located in ST's github repo of the driver, not the official linux kernel driver.