From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1AFC1C3DA5D for ; Thu, 25 Jul 2024 12:24:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YrBdab+NXRqmZpajW/0GKYHpVSbB9R8FfpXulT1+p5Y=; b=wUY3tx9DmUI5kOD41pVt21EKAq N0kNNgKA+2pP7Pe+t2oqAXg/dLAjxtlncXzvp83riJRpA0fWhz8W5Yjvz8RiDe8xEZ7pb8l9Mt365 kEzWqwEUAb3wbhYKyoxvE9XcIV1sw/0nm94Ug+/GsBH+3kiFKKhnvmr2cNaq5Lv0NLawKgzFuJsic 4Jx/64nNpc9wPCgH2KyYviVbavrhptDu2f5vSj4dnWBsy925OjzDGgqg7x9T1rn5hiR+c8zm5Q0Tu eoxNqNnrUjY2J+pUCMb769ntDf+25Sy66x67fqCz5O8wDONFWDHLMcXnJgktee2YO4xhDidT7cxb/ SwgVgcAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWxVv-00000000uGd-1vFo; Thu, 25 Jul 2024 12:24:07 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWxVW-00000000uCJ-3ghx for linux-arm-kernel@lists.infradead.org; Thu, 25 Jul 2024 12:23:44 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 311266131B; Thu, 25 Jul 2024 12:23:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F9C4C32782; Thu, 25 Jul 2024 12:23:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1721910221; bh=FxpBSkox+kGUdr5ySqjw7luWtMsnywJWHOmsE0BGYZ8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=qX2sZWHc94S27MpTxVZc+U5E2xVhnkLF6TjChRWXH9/tHggOMZTVqaHqw94yTUWg+ f63ezr45jUwxp349qcODGFFU4sTAZG0FS44par0jn7zxECLO5pv9aUjkHDza7iNhUh /KA9iJirdvlw7ME4A3m28V8mnZK59dgDv+o5HQ4WnAZMC812oq/9GckbzvH1kSqHQG iFF6N9o/2RIpJdgEygI8e15Nh2eZpjoWcVUWdAtPrW6IJYW5CdCe4s5LkrlXtrLMtj 7DmZptFZWMWZv4iMsbNZXVV/04FirzQxqEw9pNxllmAcDvtUEC629dFOHzxRh75Qv+ Xz1L0P/Kjp75g== Date: Thu, 25 Jul 2024 07:23:40 -0500 From: Rob Herring To: Olivier Moysan Cc: fabrice.gasnier@foss.st.com, Arnaud Pouliquen , Jonathan Cameron , Lars-Peter Clausen , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , 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 Message-ID: <20240725122340.GA1360128-robh@kernel.org> References: <20240724153639.803263-1-olivier.moysan@foss.st.com> <20240724153639.803263-5-olivier.moysan@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240724153639.803263-5-olivier.moysan@foss.st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240725_052343_075857_929FFEC6 X-CRM114-Status: GOOD ( 24.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 > --- > .../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)