> > SPI is very similar to I2C IMHO. I'm not sure separate infrastructure is > needed. We support SPI on MPC8xx/82xx/85xx using the standard I2C > infrastructure. I only had to add a couple of IOCTLs to control clock > frequency and polarity. Due to such an implementation, lm-sensors work > OK with SPI temperature sensors, for example.
SPI IS wery similar than I2C and for this reason it looks a like that all SPI subsystems implementations are based on I2C code. The Clock frequency and polarity is not enough, as mentioned also then addressing target chip is completelly diferent. It is done with separate PIO lines instead address send in serial line. The CS handling is also in HW level completelly independent to the srerial line driver but of cource need to me synchronized with it. This means that there should be logic to handle this CS stuff as addition of serial code. I2C subsystem does not have any kind of support of CS handlinng and for this reason i chosen to make modified version of I2C subsystem with additions needed for SPI. Kate