Re: [PATCH v2 2/2] dt-bindings: Add documentation for SPI daisy chain driver.

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

 



Hi Adrian,

On Mon, Jul 6, 2020 at 11:23 AM Adrian Fiergolski
<adrian.fiergolski@xxxxxxxxxxxxx> wrote:
> Add documentation for SPI daisy chain driver.
>
> Signed-off-by: Adrian Fiergolski <adrian.fiergolski@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxxx

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



[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