I am having problems with creating spi devices. (I wish to drive an SPI GLCD).
From Chris Boot's blog:-
I have installed the latest raspbian,3. Using SPI or I2C
The kernel above includes my SPI and I2C drivers for Raspberry Pi.
The SPI driver exposes two device files (/dev/spidev-0.0 and /dev/spidev-0.1), one for each cable select line (CE0 and CE1 on RPi). Look in the /usr/include/linux/spi/spidev.h header for how to drive this properly. There are also Python bindings available and I’m sure there are others available for other languages too. If you want to bind a kernel SPI device driver to an SPI chipselect line, you’ll have to edit the source and build your own kernel. Sorry, but that’s how it works in 3.2.
The I2C driver creates a Linux I2C bus just as any other I2C bus driver would. To use it from userspace you’ll want to load the i2c-dev module and play with /dev/i2c-0. If you want to use kernel I2C device drivers you can bind them from userspace without a rebuild, e.g.:
echo tmp102 0x48 > /sys/class/i2c-adapter/i2c-0/new_device
echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device
(Linux raspberrypi 3.1.9+ #168 PREEMPT Sat Jul 14 18:56:31 BST 2012 armv6l GNU/Linux)
I commented out the blacklist entries for i2c and spi from /etc/modprobe.d/raspi-blacklist.conf i.e.
Rebooted, and did a modprobe i2c-dev, I now see from lsmod
Code: Select all
root@raspberrypi:/# lsmod Module Size Used by i2c_dev 6115 0 snd_bcm2835 21485 0 snd_pcm 82208 1 snd_bcm2835 snd_seq 59808 0 snd_timer 21905 2 snd_seq,snd_pcm snd_seq_device 6920 1 snd_seq snd 57668 5 snd_seq_device,snd_timer,snd_seq,snd_pcm,snd_bcm2835 snd_page_alloc 5383 1 snd_pcm evdev 8922 0 spi_bcm2708 4815 0 i2c_bcm2708 3818 0
HOWEVER --- I do not get /dev/spidev-0.0 and /dev/spidev-0.1 "exposed" at all. There does not seem to be any spi modules to insert.
I would be extremely grateful if some kind person could offer a solution to my problem.