STMicroelectronics / STMems_Linux_IIO_drivers

DISCONTINUED (October 2022): the maintenance for this repository has been discontinued. Please refer to https://github.com/STMicroelectronics/st-mems-android-linux-drivers-iio for the up-to-date drivers repository. This repository contains Linux Kernel (v3.10, v3.14, v3.18, v4.9, v4.14, v4.19) including STMicroelectronics MEMS IIO sensor support
Other
76 stars 43 forks source link

Error while inserting the STM Linux driver #6

Closed SPrab3 closed 3 years ago

SPrab3 commented 3 years ago

hello,

I am trying to get the LSMDSO32 to work with https://github.com/STMicroelectronics/STMems_Linux_IIO_drivers branch 4.19 built on 5.4 kernel.

I am able to build the kernel image on 5.4

But when i try to insmod the modules i get the following errors.

insmod st_lsm6dso32.ko

[ 3073.698696] st_lsm6dso32: Unknown symbol devm_iio_kfifo_allocate (err -2)

[ 3073.706025] st_lsm6dso32: Unknown symbol devm_iio_triggered_buffer_setup (err -2)

insmod: failed to load st_lsm6dso32.ko: No such file or directory

insmod st_lsm6dso32_i2c.ko

[ 3079.860966] st_lsm6dso32_i2c: Unknown symbol st_lsm6dso32_probe (err -2)

[ 3079.868030] st_lsm6dso32_i2c: Unknown symbol st_lsm6dso32_pm_ops (err -2)

insmod: failed to load st_lsm6dso32_i2c.ko: No such file or directory

device tree:

lsm6dso32@6a {

compatible = "st,lsm6dso32";

reg = <0x6a>;

};

mariotesi commented 3 years ago

Hi, st_lsm6dso32 ko exports some symbols for the st_lsm6dso32_i2c module but it need iio framework to be already loaded into the kernel so I suggest to use modprobe st_lsm6dso32_i2c instead of insert each modules