[spi-devel-general] [PATCH 1/3] [SPI] Sync spidev.{h, c} with spi.h

David Brownell david-b at pacbell.net
Fri Jul 27 13:02:02 EST 2007


On Thursday 26 July 2007, Anton Vorontsov wrote:
> --- a/drivers/spi/spidev.c
> +++ b/drivers/spi/spidev.c
> @@ -56,8 +56,8 @@ static unsigned long	minors[N_SPI_MINORS / BITS_PER_LONG];
>  
>  
>  /* Bit masks for spi_device.mode management */
> -#define SPI_MODE_MASK			(SPI_CPHA | SPI_CPOL)
> -
> +#define SPI_MODE_MASK			(SPI_CPHA | SPI_CPOL | SPI_CS_HIGH | \
> +					 SPI_LSB_FIRST | SPI_3WIRE)

Hmm, I seem to recall explicitly leaving out CS_HIGH on the grounds
that getting it wrong could corrupt the whole bus; Not Good (tm).
And the same argument can apply to 3WIRE mode ...

On the other hand, that's not necessarily a good reason, since there
are other ways to trash hardware too.

Comments anyone?

- Dave



More information about the Linuxppc-dev mailing list