lkml.org 
[lkml]   [2020]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 1/2] spi: Add the SPI daisy chain support.
Hi Adrian,

On Mon, Jul 6, 2020 at 6:18 PM Mark Brown <broonie@kernel.org> wrote:
> On Mon, Jul 06, 2020 at 11:22:43AM +0200, Adrian Fiergolski wrote:
> > The implementation is transparent for the SPI devices and doesn't require
> > their modifications. It is based on a virtual SPI device (spi-daisy_chain)
> > and defines two required device tree properties ('spi-daisy-chain-len' and
> > 'spi-daisy-chain-noop') and one optional
>
> It would really help to have an example of how a client device will use
> this, right now it's a bit hard to follow. Overall it feels like this
> should be better abstracted, right now there's lots of ifdefs throughout
> the code which make things unclear and also seem like they're going to
> be fragile long term since realistically very few systems will be using
> this.

Can't the ifdefs be avoided by implementing this as a new SPI controller?
I.e. the daisy chain driver will operate as a slave of the parent SPI
controller,
but will expose a new SPI bus to the daisy-chained slaves.

> Perhaps this needs to be a library for devices that can daisy
> chain? It does feel like the instances should be aware of each other
> since half the point with building the hardware like this is that it
> enables operations on multiple devices to happen in sync.

Indeed. Exposing that functionality is the interesting, but hard part.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

\
 
 \ /
  Last update: 2020-07-06 21:58    [W:1.513 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site