All of lore.kernel.org
 help / color / mirror / Atom feed
* SPI Framework chip select
@ 2008-02-29 18:52 Ned Forrester
       [not found] ` <47C85451.1030809-/d+BM93fTQY@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Ned Forrester @ 2008-02-29 18:52 UTC (permalink / raw)
  To: David Brownell; +Cc: spi-devel

Can someone explain to me how the SPI Framework chip select is
supposed to work?

My pxa2xx_spi device does not use a chip_select at all, hence I have
no cs_control routine defined in struct pxa2xx_spi_chip.cs_control.  I
have never understood how chip select is supposed to work in the SPI
framework, other than explicit code in the controller driver calling a
user defined function, as in pxa2xx_spi.c.  I gather there is a
mechanism involving the struct spi_board_info.chip_select which
selects an index for a chip select at a higher level of the SPI
framework.  I don't know where the connection is between this and a
physical GPIO line connected to an external chip.

Also, in connection with the Framework chip select mechanism, I have
never understood, even if a correspondence is made between a
spi_board_info.chip_select index and a physical IO line, how that CS
is supposed to know when to change state.  It is clear in pxa2xx_spi.c
that when a user supplied cs_control function is called, the
appropriate action defined in the function will take place.  However,
the null_cs_control routine in pxa2xx_spi.c, which is called if the
user does not specify a routine in struct pxa2xx_spi_chip.cs_control,
simply returns without calling any function defined in the SPI
framework.

Dave, can you shed light for me?

-- 
Ned Forrester                                       nforrester-/d+BM93fTQY@public.gmane.org
Oceanographic Systems Lab                                  508-289-2226
Applied Ocean Physics and Engineering Dept.
Woods Hole Oceanographic Institution          Woods Hole, MA 02543, USA
http://www.whoi.edu/sbl/liteSite.do?litesiteid=7212
http://www.whoi.edu/hpb/Site.do?id=1532
http://www.whoi.edu/page.do?pid=10079


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-03-02 14:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-29 18:52 SPI Framework chip select Ned Forrester
     [not found] ` <47C85451.1030809-/d+BM93fTQY@public.gmane.org>
2008-02-29 20:04   ` David Brownell
     [not found]     ` <200802291204.33911.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-02-29 20:53       ` Ned Forrester
     [not found]         ` <47C870D5.7000109-/d+BM93fTQY@public.gmane.org>
2008-02-29 21:38           ` David Brownell
     [not found]             ` <200802291338.55149.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-02-29 22:30               ` Ned Forrester
     [not found]                 ` <47C88793.1050205-/d+BM93fTQY@public.gmane.org>
2008-03-01 20:37                   ` David Brownell
     [not found]                     ` <200803011237.51349.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-03-02  1:14                       ` Ned Forrester
     [not found]                         ` <47C9FF5E.5060503-/d+BM93fTQY@public.gmane.org>
2008-03-02  2:58                           ` David Brownell
     [not found]                             ` <200803011858.14400.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-03-02 14:08                               ` Ned Forrester

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.