custom driver fails with the message: chipselect 0 already in use
Is it possible to make spidev not to control chip select pin and do this by custom interface driver?
in other words: in device tree how to assign chip select pin to my custom driver?
I found probably similar case on stackoverflow: linux - How to add an SPI device driver, if a device is already accessed by the "spidev" driver? - Stack Overflow
Here is the answer:
“You can’t register two drivers for one HW device. Your alternative is to write your own SPI chip (client) driver according to Linux SPI driver model.”
That is ok, but at the same time it raises another question.
Working on the same adxl345 over I2C I used the same approach as I tried with SPI.
enable I2C in /boot/uEnv.txt: uboot_overlay_addr6=BB-I2C1-00A0.dtbo
develop kernel module and insert it: sudo insmod adxl345-driver.ko
run application, which refers to /dev/adxl345-i2c and read data.
So, in this case two drives works with the same HW.