linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: I have a question about SPI gpio bit-bang driver
       [not found] ` <0L4K007HPBVCV1-MiUXHoAvhViUEJcrhfAQsw@public.gmane.org>
@ 2010-06-25  9:46   ` David Brownell
  0 siblings, 0 replies; only message in thread
From: David Brownell @ 2010-06-25  9:46 UTC (permalink / raw)
  To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	riverful.kim-Sze3O3UU22JBDgjK7y7TUQ
  Cc: 대인기, 박경민



--- On Fri, 6/25/10, <riverful.kim@samsung.com> wrote:

Subject: I have a question about SPI gpio bit-bang driver


Samsung Enterprise Portal mySingle
 
#yiv578260286 P {
MARGIN-TOP:5px;FONT-SIZE:9pt;MARGIN-BOTTOM:5px;FONT-FAMILY:굴림체, arial;}
#yiv578260286 TD {
MARGIN-TOP:5px;FONT-SIZE:9pt;MARGIN-BOTTOM:5px;FONT-FAMILY:굴림체, arial;}
#yiv578260286 LI {
MARGIN-TOP:5px;FONT-SIZE:9pt;MARGIN-BOTTOM:5px;FONT-FAMILY:굴림체, arial;}
#yiv578260286  {
FONT-SIZE:9pt;FONT-FAMILY:굴림체, arial;}


I wanna add the spi device using SPI bitbang driver in the drivers/spi/spi_gpio.c.
but, the current SPI bit-bang driver may support only one bus(if, bus means physically one MOSI, MISO pin-pair), and many channel (if channel means physically one CS or EN pin in the same MOSI, MISO pin-pair).
exactly, when the board need more SPI bus for bit-banging, the current dosen't support this.
is it right??
NOT RIGHT.  Doesn't a comment up top say how tosupport multiple busses (MOSI/MISO/SCK andbus number) by including that C source file withminor configuration #defines?

The issue is that each bus needs its own uniquetight bitbanging TXRX loop ... configure those, andmost of the rest is generic/sharable.

I've certainly built systems with multiple bitbangedSPI-gpio drivers ... where each TXRX loop wasonly a few instructions, writing right to the hardwareGPIO registers as fast as the SoC could go.



 
I think the driver need to change the bus number when registering the spi board info, like this,
 
spi_register_board_info(xxx_board_info, ARRAY_SIZE(xxx_board_info));
-> spi_register_board_info(BUSNUM, xxx_board_info, ARRAY_SIZE(xxx_board_info));


Of course, just like the GPIO numbers it should use.



------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-06-25  9:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <0L4K007HPBVCV1@ms8.samsung.com>
     [not found] ` <0L4K007HPBVCV1-MiUXHoAvhViUEJcrhfAQsw@public.gmane.org>
2010-06-25  9:46   ` I have a question about SPI gpio bit-bang driver David Brownell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).