can: tcan4x5x: spi bits_per_word issue on Raspberry PI

From: FIXED-TERM Buecheler Konstantin (ETAS-SEC/ECT-Mu) <hidden>
Date: 2019-08-14 09:43:21
Also in: linux-can

Hi all,

I am trying to use a tcan4550 together with a Raspberry PI 3 B. I am using the tcan4x5x driver from net-next. 
I always get the following error during startup.
	tcan4x5x spi0.0: Probe failed, err=-22
	tcan4x5x: probe of spi0.0 failed with error -22

I realized that this happens because the Raspberry PI does only support 8/9 bit words. https://elinux.org/index.php?title=RPi_SPI#Supported_bits_per_word
In the driver it is set to 32.
	spi->bits_per_word = 32;

Setting this to 8 does not help of course since the tcan chip expects a multiple of 32 per spi transaction. 
I don't know if this is a Raspberry Pi specific problem or if there are more devices with this hardware limitation. 

Does anyone have a workaround for that? 

If this a common issue it might be a good idea to patch the driver. I will check if I can find proper a way to do so. 

Regards, 
Konstantin 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help