From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Cc: Lukas Wunner <lukas@wunner.de>, Mark Brown <broonie@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
linux-spi <linux-spi@vger.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] dt-bindings: Add documentation for SPI daisy chain driver.
Date: Mon, 6 Jul 2020 17:10:25 +0200 [thread overview]
Message-ID: <CAMuHMdW_aTKtrUnGqf3DB=fr0ZxTsjoEjMmwSpPqhwjs-Tz7ig@mail.gmail.com> (raw)
In-Reply-To: <20200706092247.20740-2-adrian.fiergolski@fastree3d.com>
Hi Adrian,
On Mon, Jul 6, 2020 at 11:23 AM Adrian Fiergolski
<adrian.fiergolski@fastree3d.com> wrote:
> Add documentation for SPI daisy chain driver.
>
> Signed-off-by: Adrian Fiergolski <adrian.fiergolski@fastree3d.com>
Thanks for your patch!
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/spi/spi-daisy_chain.txt
> @@ -0,0 +1,56 @@
> +spi-daisy_chain : The driver handling SPI daisy chains.
> +-----------------------------------------------------------
> +
> +Required properties:
> +- compatible : Should be "spi,daisy_chain"
> +- reg : Chip select assigned to the chain
> +
> + For the SPI devices on a common SPI chain - nodes of daisy_chain):
> +- spi-daisy-chain-len : Length (in bytes) of the SPI transfer,
> + when the SPI device is part of a device chain.
> +- spi-daisy-chain-noop : Byte string of no-operation command which should
> + be send when device is not addressed during the
> + given SPI transfer
The above two properties are device-specific, and the same for all
devices of the same type, thus leading to duplication.
Hence I think this should not be specified in DT, but instead handled
by the driver. I.e. for Linux, you would retrieve this from struct
spi_device, as filled in by the slave driver.
> +
> +Optional properties:
> + (for the SPI devices on a common SPI chain (nodes of daisy_chain):
> +- spi-daisy-chain-bits_per_word : no-operation transfers involve
> + one or more words; word sizes like
> + eight or 12 bits are common.
> + In-memory wordsizes are powers of two
> + bytes (e.g. 20 bit samples use 32 bits).
> + If not defined, it is assumed to be 8.
Same here.
> +Example:
> +
> + daisy_chain0: daisy_chain@0 {
> + compatible = "spi,daisy_chain";
> + spi-max-frequency = <10000000>;
> + reg = <0>;
> +
> + dac0: ltc2632@0 {
> + compatible = "lltc,ltc2634-l12";
> + spi-daisy-chain-len = <4>;
> + spi-daisy-chain-noop = [00 F0 00 00];
> + };
> + dac1: ltc2632@1 {
> + compatible = "lltc,ltc2634-l12";
> + spi-daisy-chain-len = <4>;
> + spi-daisy-chain-noop = [00 F0 00 00];
> + };
> + dac2: ltc2632@2 {
> + compatible = "lltc,ltc2634-l12";
> + spi-daisy-chain-len = <4>;
> + spi-daisy-chain-noop = [00 F0 00 00];
> + };
> + };
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
next prev parent reply other threads:[~2020-07-06 15:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-03 14:12 [PATCH 1/2] spi: Add the SPI daisy chain support Adrian Fiergolski
2020-07-03 14:12 ` [PATCH 2/2] dt-bindings: Add documentation for SPI daisy chain driver Adrian Fiergolski
2020-07-03 22:32 ` [PATCH 1/2] spi: Add the SPI daisy chain support kernel test robot
2020-07-04 0:18 ` kernel test robot
2020-07-06 9:22 ` [PATCH v2 " Adrian Fiergolski
2020-07-06 9:22 ` [PATCH v2 2/2] dt-bindings: Add documentation for SPI daisy chain driver Adrian Fiergolski
2020-07-06 15:10 ` Geert Uytterhoeven [this message]
2020-07-06 15:19 ` Adrian Fiergolski
2020-07-06 15:32 ` Geert Uytterhoeven
2020-07-06 16:22 ` Mark Brown
2020-07-07 9:55 ` Adrian Fiergolski
2020-07-06 16:18 ` [PATCH v2 1/2] spi: Add the SPI daisy chain support Mark Brown
2020-07-06 19:57 ` Geert Uytterhoeven
2020-07-07 10:25 ` Mark Brown
2020-07-07 11:06 ` Adrian Fiergolski
2020-07-07 10:53 ` Adrian Fiergolski
2020-07-07 11:21 ` Mark Brown
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='CAMuHMdW_aTKtrUnGqf3DB=fr0ZxTsjoEjMmwSpPqhwjs-Tz7ig@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=adrian.fiergolski@fastree3d.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=robh+dt@kernel.org \
/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).