From: Rob Herring <robh@kernel.org>
To: Olivier Moysan <olivier.moysan@foss.st.com>
Cc: fabrice.gasnier@foss.st.com,
Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
alsa-devel@alsa-project.org, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 4/9] dt-bindings: iio: dfsdm: move to backend framework
Date: Thu, 25 Jul 2024 07:23:40 -0500 [thread overview]
Message-ID: <20240725122340.GA1360128-robh@kernel.org> (raw)
In-Reply-To: <20240724153639.803263-5-olivier.moysan@foss.st.com>
On Wed, Jul 24, 2024 at 05:36:32PM +0200, Olivier Moysan wrote:
> Change the DFSDM binding to use the new IIO backend framework,
> along with the adoption of IIO generic channels.
> This binding change allows to add scaling support to the DFSDM.
>
> Keep the legacy binding as deprecated for backward compatibility.
>
> The io-backends property is supported only in generic IIO channel
> binding.
>
> - Channel description with the generic binding (Audio and Analog):
>
> Properties superseded by generic properties:
> st,adc-channels: becomes "reg" property in channel node
> st,adc-channel-names: becomes "label" property in channel node
> Properties moved to channel child node:
> st,adc-channel-types: becomes st,adc-channel-type
> st,adc-channel-clk-src, st,adc-alt-channel
>
> - Analog binding:
>
> DFSDM filter channel is configured as an IIO backend consumer.
> Add io-backends property in channel child nodes.
>
> DFSDM is no more configured as a channel consumer from SD modulator.
> Use of io-channels in DFSDM node is deprecated.
>
> - Audio binding:
>
> DFSDM audio DAI is configured as a channel consumer from DFSDM filter.
> No change compare to legacy.
>
> Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
> ---
> .../bindings/iio/adc/st,stm32-dfsdm-adc.yaml | 124 +++++++++++++++---
> 1 file changed, 108 insertions(+), 16 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml b/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml
> index 2722edab1d9a..ceadd73504a4 100644
> --- a/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.yaml
> @@ -102,9 +102,11 @@ patternProperties:
> items:
> minimum: 0
> maximum: 7
> + deprecated: true
>
> st,adc-channel-names:
> description: List of single-ended channel names.
> + deprecated: true
>
> st,filter-order:
> description: |
> @@ -118,6 +120,12 @@ patternProperties:
> "#io-channel-cells":
> const: 1
>
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 0
> +
> st,adc-channel-types:
> description: |
> Single-ended channel input type.
> @@ -128,6 +136,7 @@ patternProperties:
> items:
> enum: [ SPI_R, SPI_F, MANCH_R, MANCH_F ]
> $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> + deprecated: true
>
> st,adc-channel-clk-src:
> description: |
> @@ -139,6 +148,7 @@ patternProperties:
> items:
> enum: [ CLKIN, CLKOUT, CLKOUT_F, CLKOUT_R ]
> $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> + deprecated: true
>
> st,adc-alt-channel:
> description:
> @@ -147,6 +157,7 @@ patternProperties:
> If not set, channel n is connected to SPI input n.
> If set, channel n is connected to SPI input n + 1.
> type: boolean
> + deprecated: true
>
> st,filter0-sync:
> description:
> @@ -165,11 +176,60 @@ patternProperties:
> - compatible
> - reg
> - interrupts
> - - st,adc-channels
> - - st,adc-channel-names
> - st,filter-order
> - "#io-channel-cells"
>
> + patternProperties:
> + "^channel@([0-7])$":
Don't need ().
> + type: object
> + $ref: adc.yaml
> + unevaluatedProperties: false
> + description: Represents the external channels which are connected to the DFSDM.
> +
> + properties:
> + reg:
> + maximum: 7
> +
> + label:
> + description:
> + Unique name to identify which channel this is.
> +
> + st,adc-channel-type:
> + description: |
> + Single-ended channel input type.
> + - "SPI_R": SPI with data on rising edge (default)
> + - "SPI_F": SPI with data on falling edge
> + - "MANCH_R": manchester codec, rising edge = logic 0, falling edge = logic 1
> + - "MANCH_F": manchester codec, rising edge = logic 1, falling edge = logic 0
> + $ref: /schemas/types.yaml#/definitions/string
> + enum: [ SPI_R, SPI_F, MANCH_R, MANCH_F ]
> +
> + st,adc-channel-clk-src:
> + description: |
> + Conversion clock source.
> + - "CLKIN": external SPI clock (CLKIN x)
> + - "CLKOUT": internal SPI clock (CLKOUT) (default)
> + - "CLKOUT_F": internal SPI clock divided by 2 (falling edge).
> + - "CLKOUT_R": internal SPI clock divided by 2 (rising edge).
> + $ref: /schemas/types.yaml#/definitions/string
> + enum: [ CLKIN, CLKOUT, CLKOUT_F, CLKOUT_R ]
> +
> + st,adc-alt-channel:
> + description:
> + Must be defined if two sigma delta modulators are
> + connected on same SPI input.
> + If not set, channel n is connected to SPI input n.
> + If set, channel n is connected to SPI input n + 1.
> + type: boolean
> +
> + io-backends:
> + description:
> + Used to pipe external sigma delta modulator or internal ADC backend to DFSDM channel.
> + maxItems: 1
> +
> + required:
> + - reg
> +
> allOf:
> - if:
> properties:
> @@ -199,9 +259,19 @@ patternProperties:
> description:
> From common IIO binding. Used to pipe external sigma delta
> modulator or internal ADC output to DFSDM channel.
> + deprecated: true
>
> - required:
> - - io-channels
> + if:
> + required:
> + - st,adc-channels
> + then:
> + required:
> + - io-channels
> +
> + patternProperties:
> + "^channel@([0-7])$":
And here.
With that and the newline fixed,
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
next prev parent reply other threads:[~2024-07-25 12:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 15:36 [PATCH v5 0/9] iio: adc: dfsdm: add scaling support Olivier Moysan
2024-07-24 15:36 ` [PATCH v5 4/9] dt-bindings: iio: dfsdm: move to backend framework Olivier Moysan
2024-07-24 16:43 ` Rob Herring (Arm)
2024-07-25 12:23 ` Rob Herring [this message]
2024-07-24 15:36 ` [PATCH v5 7/9] iio: adc: stm32-dfsdm: adopt generic channels bindings Olivier Moysan
2024-07-27 15:18 ` Jonathan Cameron
2024-07-24 15:36 ` [PATCH v5 9/9] iio: adc: stm32-dfsdm: add scaling support to dfsdm Olivier Moysan
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=20240725122340.GA1360128-robh@kernel.org \
--to=robh@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnaud.pouliquen@foss.st.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=fabrice.gasnier@foss.st.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=olivier.moysan@foss.st.com \
/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).