linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Cc: linux-spi <linux-spi@vger.kernel.org>, Lukas Wunner <lukas@wunner.de>
Subject: Re: [cadence-spi] daisy chain
Date: Sat, 13 Jun 2020 09:33:31 +0200	[thread overview]
Message-ID: <CAMuHMdXzErU5z69=2gks5ySutkGw98O6+f7weiuPUp8uqTx63w@mail.gmail.com> (raw)
In-Reply-To: <7cddc1a3-f3a8-37dd-487a-cd2274b7941c@fastree3d.com>

Hi Adrian,

CC Lukas for #daisy-chained-devices

On Fri, Jun 12, 2020 at 6:26 PM Adrian Fiergolski
<adrian.fiergolski@fastree3d.com> wrote:
> I have a daisy chain of three ltc2634 slaves (iio/dac/ltc2632.c)
> connected to a single chip select of the cadence-spi master. I have the
> impression such a configuration is supported by none of those two
> drivers. I could try to extend both, however, I haven't found any other
> SPI driver, where I could find implementation inspiration. Is it
> supported by kernel?

drivers/gpio/gpio-max3191x.c supports "#daisy-chained-devices".
drivers/gpio/gpio-74x164.c supports multiple shift registers through the
"registers-number" DT property.

So both drivers handle this in their SPI slave drivers.

Of course this does not handle the mixed case, i.e. daisy-chaining
different types of devices.

> The documentation mentions only about the common 'daisy-chained-devices'
> property (devicetree/bindings/common-properties.txt). However, in order
> to try to implement it in the master driver, IMHO, the spi subsystem
> would need to have a call 'no-operation' to other nodes on the
> daisy-chain, which are not addressed by the given SPI access. Is there
> any recommended approach to address this case?

Supporting this in a generic way would indeed be nice, as it would mean
individual SPI slave drivers no longer have to care about it.
However, that may be difficult, as the master needs to known which
dummy (no-op) data is safe to shift through the non-addresses SPI slaves.

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

  reply	other threads:[~2020-06-13  7:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-12 16:25 [cadence-spi] daisy chain Adrian Fiergolski
2020-06-13  7:33 ` Geert Uytterhoeven [this message]
2020-06-15 13:01   ` Adrian Fiergolski
2020-06-15 13:07     ` Geert Uytterhoeven
2020-06-15 13:57       ` Adrian Fiergolski
2020-06-15 14:06         ` Adrian Fiergolski
2020-06-15 14:40           ` Geert Uytterhoeven
2020-06-15 16:05             ` Adrian Fiergolski
2020-06-15 21:30               ` Geert Uytterhoeven
2020-06-15 22:22                 ` Rob Herring
2020-06-16 10:25                   ` Adrian Fiergolski
2020-06-17 12:33                     ` Adrian Fiergolski
2020-07-01 13:47                       ` SPI daisy chain support Adrian Fiergolski

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='CAMuHMdXzErU5z69=2gks5ySutkGw98O6+f7weiuPUp8uqTx63w@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=adrian.fiergolski@fastree3d.com \
    --cc=linux-spi@vger.kernel.org \
    --cc=lukas@wunner.de \
    /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).