1
I have a Holt HI-3110 chip that implements a CAN bus interface that is run over an SPI host interface. A driver for the chip is in the Linux mainline (in /drivers/net/can/spi). I'm targeting a host platform with no SPI host interface, so I've installed a Microchip MCP2210 USB-to-SPI bridge that is also supported in the Linux mainline (in /drivers/hid). Banging on the /dev/hidraw0 device from user code seems to work fine.
I assume I need to convert the SPI driver to a platform driver that looks for the correct hid driver and uses it to get to the CAN chip. Can someone point me to a driver that does something similar (using another driver to get to a device)?
You mean you want to connect USB to SPI to CAN, when there are USB to CAN adapters? – sawdust – 2019-01-10T08:16:45.230
E.g.: Bluetooth has several transport drivers, as does HID itself (e.g. HID over I2C as opposed over USB). I am not sure if there's a "standard" way in the kernel to do this. – dirkt – 2019-01-12T13:04:33.823