Kernel driver hacking for Raspberry Pi I/O interface

We’ve started work on the kernel drivers for the i/o.

We’re writing kernel drivers for the BCM2835 SPI controller and linking it up with the spidev device driver. As such you’ll get /dev/spidev0.0 — where 0 is replaced by whichever CS pin is used. There’s a few lines of debug for progress. Clearly we need to sort out some of the settings. Hopefully we’ve have something nearly ready by this time next week.

root@raspberrypi:~# dmesg | grep spi
in spi_init driver
in bcm2835_spi_probe
bcm2835_spi bcm2835_spi.0: registered master spi0
in bcm2835_spi_setup
spi spi0.0: setup mode 0, 8 bits/w, 500 Hz max –> 0
bcm2835_spi bcm2835_spi.0: registered child spi0.0
root@raspberrypi:~# echo ‘f’ > /dev/s
scd0       sg0        shm/       sr0        stdin     
sda        sg1        spidev0.0  stderr     stdout    
root@raspberrypi:~# echo ‘f’ > /dev/spidev0.0
root@raspberrypi:~# dmesg | grep spi
in spi_init driver
in bcm2835_spi_probe
bcm2835_spi bcm2835_spi.0: registered master spi0
in bcm2835_spi_setup
spi spi0.0: setup mode 0, 8 bits/w, 500 Hz max –> 0
bcm2835_spi bcm2835_spi.0: registered child spi0.0
in bcm2835_spi_transfer
in bcm2835_spi_work
in bcm2835_spi_setup_transfer
bcm2835_spi wrote  0xFA to 0xD0800008
root@raspberrypi:~#

Advertisements