cancel
Showing results for 
Search instead for 
Did you mean: 

Error while inserting the STM Linux driver

SPrab.3
Associate II

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.

Any one came across this or know what is the issue?

# 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>;

};

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @SPrab.3​ ,

yes, it is needed for the internal clock tree configuration, in particular the ADC2 one (see datasheet, p.28).

If you just need the temperature data you can set the minimum ODR, since temperature is an environmental parameter with a low changing rate.

-Eleon

View solution in original post

6 REPLIES 6
Eleon BORLINI
ST Employee

Hi @SPrab.3​ ,

I suggest you to post your observation directly on Github, in the Issue tab.

Our experts will reply you within few days, and mostly with the bug fixed if it is the case.

Let me please know if you have not already tried or in case there will be updates on the topic. This will help other users with the same issue to find the answer faster.

-Eleon

SPrab.3
Associate II

sure.

Also, i am trying to get the Temp readings thru I2C.

I see that there are 2 registers 0x20 and 0x21.

A simple i2c read does not seem to fetch the values (its on bus 2, chip add 0x6a)

# i2cget -fy 2 0x6a 0x20                            

0x00

# i2cget -fy 2 0x6a 0x21                            

0x00

whereas i can fetch the WHO_AM_I register

# i2cget -fy 2 0x6a 0xf                             

0x6c

Anything else is needed to get the temp reads? may be is it because i cannot insert the module?

Eleon BORLINI
ST Employee

Hi @SPrab.3​ ,

you first have to configure the ODR and power mode (and full scale) to get an output for the temperature data.

-Eleon

SPrab.3
Associate II

hello Eleon, thanks for the info. I did not quite see a register to configure the TODR. Does it need the accelerometer ODR and FS?

Eleon BORLINI
ST Employee

Hi @SPrab.3​ ,

yes, it is needed for the internal clock tree configuration, in particular the ADC2 one (see datasheet, p.28).

If you just need the temperature data you can set the minimum ODR, since temperature is an environmental parameter with a low changing rate.

-Eleon

SPrab.3
Associate II

thank you