This document describes the installation procedure for the SPI driver.

There are 2 basic steps to take:
1.) Prepare the driver and the system for use.
2.) Load tha driver into the kernel, possibly with options.

Prepare the driver and the system
=================================

* First, you must be root for this all to work.

* Build the driver by typing 
	make
  in the directory where you unpacked the archive. This creates a file spi.ko
  if all is ok, type
	make install


* Add a line to /etc/udev/udev.rules

	KERNEL=="spi", mode="0666"

  Don't forget to restart udev with
	/etc/init.d/udev restart

  
* If you want to have the driver loaded at boot time then do this step:
  Edit the file /etc/modules  and add a line like this:
  
  	spi base=0x378 idle_ce=0xff
  	
  The values of <base> and <idle_ce> given above are the default ones
  compiled into the driver. The <base> must be set to the address of the
  parallel port to use. (0x378 is the first, 0x278 the second and 0x3bc
  that on the hercules graphics cards.) The <idle_ce> is the line status
  of the CE-lines when the bus is not in use. Change it to reflect the right
  combination of CEs of your chips on the bus.
	
* If your startup scripts do not do it for you, issue the command
	depmod -a
	
* If you do not run kerneld then you must load the module before you can use
  it: (every time, not just once for the installation)

  	/sbin/modprobe spi base=0x378 idle_ce=0xff

  If you use the values given above you do not have to specify them as they
  are the defaults, compiled into the driver. You have to specifiy only a value
  that differs from the default on your machine. But most machines can use
  these defaults. The idle_ce is perhaps the most likely candidate as there
  are 256 possibilities for the correct combination of the idle stat of the
  CE-lines. So the load will usually take this form:

      /sbin/modprobe spi idle_ce=<my CE settings>
  	
  To unload it: rmmod spi
  
  If you run kerneld, then you must specify this info in the conf.modules
  file as indicated avove, because that is the place where the kerneld looks
  for the parameters.

How to use the spi device from then on is described in the file
spi-driver_v2-interface.txt.
