0

I want to use my ADIS16507-1 sensor on my Raspberry Pi 4 but I can't see my sensor.

I explain you step by step. To use my sensor I have to compile the Analog Devices kernel by modifying the configuration file as indicated by the manufacturer so that it is adapted to my sensor ADIS16475 IIO.

Once this step is done I will put my new kernel on a SD card where I put the version of Raspberry Pi OS Lite : 2021-10-30-raspios-bullseye-armhf-lite.img

Once my Raspberry pi 4 is running I should normally see my sensor

$ ls /sys/bus/iio/devices/
iio:device0

But I don't have iio:device0.

I think that the problem comes from my spi_bcm2835 module because when my raspberry starts I have in the logs :

$ dmesg
spi_bcm2835: disagrees about version of symbol dev_driver_string
spi_bcm2835: Unknown symbol dev_driver_string (err -22)
spi_bcm2835: disagrees about version of symbol _dev_info
spi_bcm2835: Unknown symbol _dev_info (err -22)
spi_bcm2835: disagrees about version of symbol _dev_err
spi_bcm2835: Unknown symbol _dev_err (err -22)
spi_bcm2835: disagrees about version of symbol __devm_spi_alloc_controller
spi_bcm2835: Unknown symbol __devm_spi_alloc_controller (err -22)
spi_bcm2835: disagrees about version of symbol spi_unregister_controller
spi_bcm2835: Unknown symbol spi_unregister_controller (err -22)
spi_bcm2835: disagrees about version of symbol spi_split_transfers_maxsize
spi_bcm2835: Unknown symbol spi_split_transfers_maxsize (err -22)
spi_bcm2835: disagrees about version of symbol _dev_warn
spi_bcm2835: Unknown symbol _dev_warn (err -22)
spi_bcm2835: disagrees about version of symbol dev_err_probe
spi_bcm2835: Unknown symbol dev_err_probe (err -22)
spi_bcm2835: disagrees about version of symbol spi_register_controller
spi_bcm2835: Unknown symbol spi_register_controller (err -22)

I can't load this module with modprobe or insmod. Another problem, the list of module errors like the one above in my dmesg is still very long.

rfkill: disagrees about version of symbol put_device
rfkill: Unknown symbol put_device (err -22)
uio: disagrees about version of symbol kobject_uevent
uio: Unknown symbol kobject_uevent (err -22)
llc: disagrees about version of symbol consume_skb
llc: Unknown symbol consume_skb (err -22)
...

And I can't load any modules.

sudo modprobe spi-bcm2835
modprobe: ERROR: could not insert 'spi_bcm2835': Invalid argument

The error could be from my kernel version but I have a feeling it's good.

uname -a
Linux raspberrypi 5.10.63-v7l+ #2 SMP Mon Jun 27 01:50:44 PDT 2022 armv7l GNU/Linux

My kernel is version 5.10.63-v7l+ just like Analog Devices kernel.

I'm running out of ideas to find my problem. Ask me if I have not provided enough detail. Thanks a lot in advance,


I found a solution. I don't go through the Analog Device kernel anymore.

I put on my SD card the last version of Raspberry Pi lite OS. Then I launch my Raspberry Pi and I update to get the same kernel version as the Raspberry Pi Github.

To check on my Raspberry Pi :

uname -r
5.15.50-v7l+

To check on Github I look in linux/Makefile

VERSION = 5
PATCHLEVEL = 15
SUBLEVEL = 50

Once I have the same version, I do exactly the same steps as the Raspberry Pi tuto the Raspberry Pi tuto and I add in my .config my driver.

CONFIG_SPI_MASTER=y
CONFIG_IIO=y
CONFIG_ADIS16475=m
CONFIG_IIO_KFIFO_BUF=y
CONFIG_SPI_BCM2835=y

Thanks to that I added my ADIS16475 driver on my kernel and I just have to load it by doing

sudo modprobe adis16475 

however in my case I still have this error in the dmesg when I modporbe

SPI driver adis16475 has no spi_device_id for adi,adis16470
SPI driver adis16475 has no spi_device_id for adi,adis16475-1
SPI driver adis16475 has no spi_device_id for adi,adis16475-2
SPI driver adis16475 has no spi_device_id for adi,adis16475-3
SPI driver adis16475 has no spi_device_id for adi,adis16477-1
SPI driver adis16475 has no spi_device_id for adi,adis16477-2
SPI driver adis16475 has no spi_device_id for adi,adis16477-3
SPI driver adis16475 has no spi_device_id for adi,adis16465-1
SPI driver adis16475 has no spi_device_id for adi,adis16465-2
SPI driver adis16475 has no spi_device_id for adi,adis16465-3
SPI driver adis16475 has no spi_device_id for adi,adis16467-1
SPI driver adis16475 has no spi_device_id for adi,adis16467-2
SPI driver adis16475 has no spi_device_id for adi,adis16467-3
SPI driver adis16475 has no spi_device_id for adi,adis16500
SPI driver adis16475 has no spi_device_id for adi,adis16505-1
SPI driver adis16475 has no spi_device_id for adi,adis16505-2
SPI driver adis16475 has no spi_device_id for adi,adis16505-3
SPI driver adis16475 has no spi_device_id for adi,adis16507-1
SPI driver adis16475 has no spi_device_id for adi,adis16507-2
SPI driver adis16475 has no spi_device_id for adi,adis16507-3

I also asked the question on the ADI Engineer zone

Dimi
  • 1
  • 2
  • Have you built your kernel with `CONFIG_ADIS16475=m`? Have you enabled it in Device Tree? – 0andriy Jun 23 '22 at 20:27
  • Note, you shouldn't see _/dev/spi*_ if you are using in-kernel driver. – 0andriy Jun 23 '22 at 20:27
  • I have been searching for a while and my situation has progressed. I am updating my post – Dimi Jun 27 '22 at 11:40
  • You are building and trying to run on a different kernel versions. Fix that first, and else will be much easier. – 0andriy Jun 27 '22 at 21:54
  • The version of the kernel I put on my SD card (2021-10-30-raspios-bullseye-armhf-lite.img) is according to a uname -r : 5.10.63-v7l+ and the version of the kernel of analog devices is : 5.10.63-v7l+ according to /linux/lib/modules/ 5.10.63-v7l+/ I have the impression that they are the same one not? – Dimi Jun 29 '22 at 12:16
  • My modules are compiled for the right kernel $modinfo spi-bcm2835 : vermagic: 5.10.63-v7l+, the "Unknown symbol xxx (err -22)" exist all in /proc/kallsyms . I don't understand why modprobe or insmod can't make the link – Dimi Jun 30 '22 at 09:41
  • I downloaded "sudo apt install raspberrypi-kernel-headers" and "make -C /lib/modules/$(uname -r)/build M=$PWD modules" in my /lib/modules/5.10.63-v7l+/build to see if it changed anything but it did nothing – Dimi Jun 30 '22 at 09:52
  • however, the name in "Unknown symbol xxx (err -22)" does not exist in /lib/modules/5.4.83-v7l+/build/Module.symvers – Dimi Jun 30 '22 at 10:03
  • 1
    the answer is here : https://ez.analog.com/mems/f/q-a/560360/spi-driver-adis16475-has-no-spi_device_id-for-adi-adis16470 – Dimi Aug 02 '22 at 13:50

0 Answers0