Can SPI be loaded earlier?.

FernandoFernando Posts: 22New Member
edited December 2016 in 40-PIN GP-bus

I am experimenting with a SPI display and fbtft driver. I want to load the kernel module fbtft_device at startup so I added it to /etc/modules-load.d and /etc/modprobe.d but I am getting the following error:
[email protected]:~# dmesg | grep -i fbtft
[    3.456418] fbtft_device: spi_busnum_to_master(2) returned NULL
[    3.463075] fbtft_device: failed to register SPI device

So it seems that the module was going to loaded when SPI was not available yet. So that's my question. Is there a way to get /dev/spidev2.0 available in an earlier stage?.

For the record, if I modprobe the module from /etc/rc.local, it loads fine.

Thanks. kind regards.


  • Dan O'DonovanDan O'Donovan Posts: 218Emutex mod
    Perhaps you could try adding the 'spi_pxa2xx_platform' module before the 'fbtft_device' module? That might ensure that the SPI controller driver gets loaded first. I haven't tested it myself though.
  • FernandoFernando Posts: 22New Member
    Hi Dan.

    spi_pxa2xx_platform needs no parameters?

  • Dan O'DonovanDan O'Donovan Posts: 218Emutex mod
    No parameters needed for spi_pxa2xx_platform
  • FernandoFernando Posts: 22New Member
    Adding 'spi_pxa2xx_platform' to /etc/modules-load.d did the trick. Thanks.
Sign In or Register to comment.