Re: SPI chip select problem

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

 



On Mon, Jun 25, 2012 at 02:07:34PM +0400, Antony Pavlov wrote:
> On 25 June 2012 12:53, Johannes Stezenbach <js@xxxxxxxxx> wrote:
> > On Mon, Jun 25, 2012 at 11:45:06AM +0400, Antony Pavlov wrote:
> >>
> >> There is the 'cs_change' flag for *_spi_transfer() method, but this
> >> flag does not used at all!
> >
> > altera_spi.c and mic_spi.c use it, but often this is not needed (e.g. for
> > SPI flashes) so to keep the code simple and small it might be better
> > to not implement cs_change handling.
> 
> But I have not found any common code where cs_change is managed.

It doesn't need to be handled in common code, the spi_device
driver requests a cs_change if it needs one, the spi_master driver
programs the hardware to do it.  Common code in drivers/spi/spi.c
doesn't need to care.  (To clarify: cs_change does not mean
to switch from one CS to another, it means to pulse the
CS line between spi_transfers of a spi_message.  Some devices
need that in some cases.)


Johannes

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox


[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux