Re: [PATCH 02/10] spi: dw-mid: always use duplex transfers when DMA

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

 



On Wed, 2014-09-24 at 12:07 +0100, Mark Brown wrote:
> On Wed, Sep 24, 2014 at 01:32:27PM +0300, Andy Shevchenko wrote:
> > On Wed, 2014-09-24 at 09:44 +0100, Mark Brown wrote:
> > > On Thu, Sep 18, 2014 at 08:08:52PM +0300, Andy Shevchenko wrote:
> 
> > > > In case of DMA we never got things done until we enable both channels. In case
> > > > of receive only or send only mode the user has to provide a dummy buffer.
> 
> > > The driver must never impose such requirements on clients, they
> > > shouldn't need to know about the quirks of the controller.  There's
> > > support in the core providing dummy buffers for transmit and receive,
> > > you should use that (possibly extending it so the dummies are only
> > > provided for DMA).
> 
> > Currently driver in case of receiving or sending only will never call
> > the xfer_done from DMA callback since we never will have counter equal
> > to 2. So, the driver already relies on duplex mode. Am I missing
> > something?
> 
> Please re-read what I wrote above, especially the first phrase.  You
> can't require that we rewrite essentialy every SPI driver on the off
> chance that it's used with this controller.

I think I know how to satisfy the user and fix the driver.
I will remake the approach.


-- 
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
Intel Finland Oy

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux