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