From: Jonathan Cameron <jic23@kernel.org>
To: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
~lkcamp/patches@lists.sr.ht, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] dt-bindings:iio:adc:st,spear600-adc: txt to yaml format conversion.
Date: Sun, 4 May 2025 17:53:45 +0100 [thread overview]
Message-ID: <20250504175345.2465f82a@jic23-huawei> (raw)
In-Reply-To: <20250430020248.26639-1-rodrigo.gobbi.7@gmail.com>
On Tue, 29 Apr 2025 22:50:01 -0300
Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com> wrote:
> Straight forward conversion from spear-adc.txt into yaml format.
>
> Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>
> ---
> Some constraints were extracted from the driver (spear_adc.c) and the public datasheet
> referenced at the yaml.
>
> Changelog:
> v2: add constraints over properties and remove a ref at MAINTAINERS file.
> v1: https://lore.kernel.org/linux-devicetree/20250423022956.31218-1-rodrigo.gobbi.7@gmail.com/
> ---
> .../bindings/iio/adc/st,spear600-adc.yaml | 69 +++++++++++++++++++
> .../bindings/staging/iio/adc/spear-adc.txt | 24 -------
> MAINTAINERS | 2 +-
> 3 files changed, 70 insertions(+), 25 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/iio/adc/st,spear600-adc.yaml
> delete mode 100644 Documentation/devicetree/bindings/staging/iio/adc/spear-adc.txt
>
> diff --git a/Documentation/devicetree/bindings/iio/adc/st,spear600-adc.yaml b/Documentation/devicetree/bindings/iio/adc/st,spear600-adc.yaml
> new file mode 100644
> index 000000000000..afce10eab1c1
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/st,spear600-adc.yaml
> @@ -0,0 +1,69 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/iio/adc/st,spear600-adc.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ST SPEAr ADC device driver
> +
> +maintainers:
> + - Jonathan Cameron <jic23@kernel.org>
> +
> +description: |
> + Integrated ADC inside the ST SPEAr SoC, SPEAr600, supporting
> + 10-bit resolution. Datasheet can be found here:
> + https://www.st.com/resource/en/datasheet/spear600.pdf
> +
> +properties:
> + compatible:
> + enum:
> + - st,spear600-adc
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + sampling-frequency:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 2500000
> + maximum: 20000000
> + description:
> + Default sampling frequency of the ADC
For consistency probably wants a full stop. (as well as units)
> +
> + vref-external:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 1000
> + maximum: 2800
> + description:
> + External voltage reference in milli-volts. If omitted
Very short wrap. Go up to 80 chars.
> + the internal voltage reference will be used.
> +
> + average-samples:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 1
> + maximum: 128
> + default: 0
> + description:
> + Number of samples to generate an average value. If
> + omitted, single data conversion will be used.
It is odd to have a default outside of range. I'll wait
to see what Conor suggests for that. I'm fine with anything
that doesn't trip up the dt parsing!
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - sampling-frequency
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + adc: adc@d8200000 {
> + compatible = "st,spear600-adc";
> + reg = <0xd8200000 0x1000>;
> + interrupt-parent = <&vic1>;
> + interrupts = <6>;
> + sampling-frequency = <5000000>;
> + vref-external = <2500>; /* 2.5V VRef */
> + };
prev parent reply other threads:[~2025-05-04 16:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-30 1:50 [PATCH v2] dt-bindings:iio:adc:st,spear600-adc: txt to yaml format conversion Rodrigo Gobbi
2025-04-30 15:42 ` Conor Dooley
2025-05-03 18:44 ` Rodrigo Gobbi
2025-05-06 12:50 ` Conor Dooley
2025-05-20 20:43 ` Rodrigo Gobbi
2025-05-21 15:50 ` Conor Dooley
2025-05-04 16:53 ` Jonathan Cameron [this message]
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=20250504175345.2465f82a@jic23-huawei \
--to=jic23@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=rodrigo.gobbi.7@gmail.com \
--cc=~lkcamp/patches@lists.sr.ht \
/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