devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Arnaud Pouliquen <arnaud.pouliquen@st.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-iio@vger.kernel.org, alsa-devel@alsa-project.org,
	Lee Jones <lee.jones@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: Alexandre Torgue <alexandre.torgue@st.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>
Subject: Re: [PATCH 3/7] IIO: add bindings for STM32 DFSDM ADC driver
Date: Sun, 29 Jan 2017 11:58:26 +0000	[thread overview]
Message-ID: <fa6b541d-2818-afa7-82fa-eb19806e9f4d@kernel.org> (raw)
In-Reply-To: <1485189145-29576-4-git-send-email-arnaud.pouliquen@st.com>

On 23/01/17 16:32, Arnaud Pouliquen wrote:
> This patch adds documentation of device tree bindings for the
> STM32 DFSDM ADC.
> 
> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Trivial bits inline.
> ---
>  .../bindings/iio/adc/st,stm32-dfsdm-adc.txt        | 60 ++++++++++++++++++++++
>  1 file changed, 60 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.txt 
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.txt  b/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.txt 
> new file mode 100644
> index 0000000..c156bcb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.txt 	
> @@ -0,0 +1,60 @@
> +STMicroelectronics STM32 DFSDM ADC device driver
> +
> +STM32 DFSDM ADC is a sigma delta analog-to-digital converter.
> +It has to be declared in device-tree as a subnode of the DFSDM mfd node.
> +
> +It has several multiplexed input channels. Conversions can be performed
> +in single, scan or discontinuous mode. Conversions can be launched in software
> +or using hardware triggers.
> +Each instance of the driver uses one filter instance handle by the DFSDM mfd
> +driver.
> +
> +DFSDM also offers extra features:
> +-The analog watchdog feature allows the application to detect if the
> + input voltage goes beyond the user-defined, higher or lower thresholds.
> +-The short circuit detection allows allows the application to detect if the
> + input is in CC.
> +-The clock absence detection allows application to detect if SPI input is clocked.
> +
> +Required properties:
> +- compatible:	Must be "st,stm32-dfsdm-adc".
> +- reg:		Specifies the DFSDM filter instance.
> +- #io-channel-cells = <1>: See the IIO bindings section "IIO consumers".
> +- st,adc-channels:	List of single-ended channels muxed for this ADC.
> +- st,adc-channel-names:	List of single-ended channels Name.
> +
> +Optional properties:
> +- st,adc-channel-types:	Single-ended channel input type. Default value is 0.
> +			- 0: SPI with data on rising edge (default)
> +			- 1: SPI with data on falling edge
This is an element that can be described without magic numbers so I'd
prefer that you do so.

Also spell check edage -> edge.

> +			- 2: manchester codec, rising edage = logic 0
> +			- 3: manchester codec, rising edage = logic 1
> +- st,adc-channel-clk-src: Conversion clock source. default value is 1.
> +			  - 0: External SPI clocl (CLKIN x)
> +			  - 1: internal SPI clock (CLKOUT) (default)
> +			  - 2: internal SPI clock divided by 2 (falling edge).
> +			  - 2: internal SPI clock divided by 2 (rising edge).
3?
> +- st,adc-alt-channel: 	  must be defined if Two ADCs 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.
? Two data inputs with shared clock?
> +
> +Example:
> +	dfsdm: dfsdm@4400D000 {
> +		iio_dfsdm0: iio-dfsdm@0 {
> +			compatible = "st,stm32-dfsdm-adc";
> +			#io-channel-cells = <1>;
> +			reg = <0>;
> +			st,adc-channels = <1>;
> +			st,adc-channel-names = "in0";
> +		};
> +		iio_dfsdm1: iio-dfsdm@1 {
> +			compatible = "st,stm32-dfsdm-adc";
> +			#io-channel-cells = <1>;
> +			reg = <1>;
> +			st,adc-channels = <1>;
> +			st,adc-channel-names = "in1";
> +			st,adc-channel-types = <1>;
> +			st,adc-alt-channel = <1>;
> +		};
> +	};
> 

  reply	other threads:[~2017-01-29 11:58 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 16:32 [PATCH 0/7] Add STM32 DFSDM support Arnaud Pouliquen
2017-01-23 16:32 ` [PATCH 1/7] MFD: add bindings for STM32 DFSDM driver Arnaud Pouliquen
2017-01-27 20:53   ` Rob Herring
2017-01-30 13:16     ` Arnaud Pouliquen
2017-01-23 16:32 ` [PATCH 4/7] IIO: add STM32 DFSDM ADC support Arnaud Pouliquen
2017-01-29 12:15   ` Jonathan Cameron
2017-01-30 16:02     ` Arnaud Pouliquen
2017-01-23 16:32 ` [PATCH 5/7] ASoC: dmaengine_pcm: add copy support Arnaud Pouliquen
     [not found]   ` <1485189145-29576-6-git-send-email-arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
2017-01-23 17:50     ` Mark Brown
2017-01-24  2:14     ` [alsa-devel] " kbuild test robot
     [not found] ` <1485189145-29576-1-git-send-email-arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
2017-01-23 16:32   ` [PATCH 2/7] MFD: add STM32 DFSDM support Arnaud Pouliquen
     [not found]     ` <1485189145-29576-3-git-send-email-arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
2017-01-24  0:36       ` [alsa-devel] " kbuild test robot
2017-01-24  8:22       ` Lee Jones
2017-01-24  8:30         ` Arnaud Pouliquen
     [not found]           ` <283c0e48-55e2-6516-369d-91dc72d12f73-qxv4g6HH51o@public.gmane.org>
2017-01-24 11:36             ` Lee Jones
2017-01-24 13:32               ` Arnaud Pouliquen
2017-01-27 10:15                 ` Lee Jones
2017-01-27 13:45                   ` Arnaud Pouliquen
     [not found]                     ` <7b3eb38d-4fd1-2006-7423-94f2a7b38b27-qxv4g6HH51o@public.gmane.org>
2017-01-27 17:17                       ` Lee Jones
2017-01-29 12:28                         ` Jonathan Cameron
2017-01-29 14:19                           ` Lars-Peter Clausen
2017-01-29 14:34                             ` Lars-Peter Clausen
2017-01-30 11:13                               ` Arnaud Pouliquen
     [not found]                                 ` <2e6c07cb-f67b-64ff-530b-6bc2073272a9-qxv4g6HH51o@public.gmane.org>
2017-02-04 12:15                                   ` Jonathan Cameron
2017-01-31 15:30                             ` Arnaud Pouliquen
2017-01-30 11:23                         ` Arnaud Pouliquen
2017-01-29 17:50                       ` Mark Brown
2017-01-30 18:14                         ` Arnaud Pouliquen
2017-01-29 11:20                 ` Jonathan Cameron
2017-01-29 11:53       ` Jonathan Cameron
2017-01-30 15:08         ` Arnaud Pouliquen
2017-01-30 20:44           ` Jonathan Cameron
2017-01-23 16:32   ` [PATCH 3/7] IIO: add bindings for STM32 DFSDM ADC driver Arnaud Pouliquen
2017-01-29 11:58     ` Jonathan Cameron [this message]
2017-01-29 12:42       ` Jonathan Cameron
2017-01-31 14:10         ` Arnaud Pouliquen
     [not found]           ` <d9747aa9-e3c2-f280-7dca-8862e8e74e6e-qxv4g6HH51o@public.gmane.org>
2017-02-04 12:09             ` Jonathan Cameron
2017-01-30 15:26       ` Arnaud Pouliquen
2017-01-23 16:32   ` [PATCH 6/7] ASoC: add bindings for STM32 DFSDM driver Arnaud Pouliquen
2017-01-29 12:19     ` Jonathan Cameron
2017-01-30 17:32       ` Arnaud Pouliquen
     [not found]         ` <71612ea0-c9d0-a85e-2d58-72609df57e35-qxv4g6HH51o@public.gmane.org>
2017-02-04 12:13           ` Jonathan Cameron
2017-01-23 16:32   ` [PATCH 7/7] ASoC: add STM32 DFSDM support Arnaud Pouliquen

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=fa6b541d-2818-afa7-82fa-eb19806e9f4d@kernel.org \
    --to=jic23@kernel.org \
    --cc=alexandre.torgue@st.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnaud.pouliquen@st.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=perex@perex.cz \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@kernel.org \
    --cc=tiwai@suse.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).