linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Hemanth V <hemanthv@ti.com>
Cc: David Brownell <david-b@pacbell.net>,
	spi-devel-general@lists.sourceforge.net,
	linux-omap@vger.kernel.org
Subject: Re: [spi-devel-general] [RESEND][PATCH 0/2] McSPI Slave and DMA , FIFO support
Date: Fri, 28 Aug 2009 09:10:07 -0700	[thread overview]
Message-ID: <20090828161007.GL25828@atomide.com> (raw)
In-Reply-To: <060601ca27d7$d2a87df0$LocalHost@wipultra793>

* Hemanth V <hemanthv@ti.com> [090828 05:05]:
> ---- Original Message ----- From: "David Brownell" <david-b@pacbell.net>
>
>
>> On Sunday 05 July 2009, Hemanth V wrote:
>>> Do you see any major changes required to support
>>> slave mode in the SPI core driver.
>>
>> There *is* no such thing as a "SPI core driver"...
>>
> I was referring to
>
> spi.c - SPI init/core code
>
>>
>>> We are able to use the existing interface for slave mode also, but
>>> some APIs/ Structures could be made generic.
>>
>> Three things are obvious:
>>
>> - A spi_master is not a slave side driver!
>
> Yes a more generic or new structure would be good,
> but the current one does work for slave mode also.
>
>>
>> - Control model would need to be inverted
>>    * Chip select would be one input,
>>      not N outputs
>>    * No clock rate controls at all
>
> Conditional checks for slave/master mode have been added in
> the driver where required.
>
>>    * latency issues ... driver can't necessarily
>>      respond quickly enough to guarantee no data
>>      loss (FIFOs help)
>
> We currently support both FIFO and DMA for
> slave mode
>
>>    * Can't re-use /dev/spidev*
>>    * Request queue would have a very different role
>>
>> - Some primitives are likely missing, for flow
>>   control (when hardware has a READY handshake)
>>
>> I think a few proposals for how to handle slave
>> side have been circulated.
>
> So would it be possible to merge the slave support also for
> now, and could be modified to support the new slave interface
> as and when available.

In general it's not good to merge half implemented patches.

That's because it usually means that the work on getting
things cleaned up stops right there.

And then the community is left to deal with the mess.

So I recommend doing it clean from the start rather than
merging in hacks.

Tony

  reply	other threads:[~2009-08-28 16:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 13:53 [RESEND][PATCH 0/2] McSPI Slave and DMA ,FIFO support Hemanth V
2009-07-03  0:05 ` David Brownell
2009-07-06  6:47   ` Hemanth V
2009-08-28  5:42     ` [spi-devel-general] [RESEND][PATCH 0/2] McSPI Slave and DMA , FIFO support David Brownell
2009-08-28 12:05       ` Hemanth V
2009-08-28 16:10         ` Tony Lindgren [this message]
2009-08-28 17:32         ` David Brownell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090828161007.GL25828@atomide.com \
    --to=tony@atomide.com \
    --cc=david-b@pacbell.net \
    --cc=hemanthv@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=spi-devel-general@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).