@nsmith said in Multiple devices on same SPI bus:
Do i need to do insmod command three times with three different chip select pins?
No, you can't insmod the same kernel module multiple times.
But you can just append another three numbers for each additional CS you need, the first being the mode, the second the speed, and the third the GPIO for the CS.
Like this, which adds a second CS with SPI mode=0, speed=100kHz on GPIO19, and a third on GPIO44:
insmod spi-gpio-custom bus0=1,11,5,4,0,100000,18,0,100000,19,0,100000,44
You can repeat that up to a total of 8 CS lines!
Then do fopen on the three resulting devices in /dev?
Yes, these will be named /dev/spidev1.0, /dev/spidev1.1 and /dev/spidev1.2, resp.
BTW: if you need multiple buses, i.e. another set of SCK,MISO,MOSI plus some CS, you can append bus1=2,... to the same command line, separated with a space. Up to 4 buses are supported.