Re: Adding decoded Chip Select capability to the kernel SPI driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Tim,
Please check this already discussed topic:
http://lists.arm.linux.org.uk/lurker/message/20080917.185043.00b03d1d.en.html

Kind regards,
Andrejs Cainikovs


Tim Barr wrote:
> I am looking at how to add decoded chip select capability to my
> AT91SAM9G20 design at the kernel level. I wanted to throw out an
> approach to this to see if it makes sense from the kernel level. 
>  
> The first item would be a control bit to set up the driver to operate in
> either a decoded or straight chip select mode. In the spi_device struct
> there is a u8 variable called 'mode' defined. Of the eight bits in the
> word, 6 bits are assigned and 2 are undefined. I am not sure if I should
> one of these undefined bits as a "encode_CS" bit, or if I should add an
> additional variable to the end of the struct.
>  
> Since the Atmel SPI driver controls the CS pins as GPIOs, instead of
> using the SPI engine, I assume that it will not be too difficult to
> modify the code to allow either straight or encoded chip select
> operation. Looking at the code, I am thinking of adding the CS encoding
> code to the cs_activate and cs_deactivate processes. Does that make
> sense? 
>  
> Thanks!
>
>
> Timothy Barr
> Hardware Development Engineer
> for Multi-Tech Systems, Inc.
>  <mailto:tbarr@xxxxxxxxxxxxx> tbarr@xxxxxxxxxxxxx 
>
>  
> -------------------------------------------------------------------
> List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
> FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
> Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
>   

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter