From: Hugo Villeneuve <hugo@hugovil.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: hvilleneuve@dimonoff.com, jic23@kernel.org, lars@metafoo.de,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] dt-bindings: iio: adc: add Texas Instruments ADS7924
Date: Sun, 15 Jan 2023 11:22:05 -0500 [thread overview]
Message-ID: <20230115112205.e46ab8d017b99dd987d003e4@hugovil.com> (raw)
In-Reply-To: <dee8fbdc-5399-d5ce-8d01-2c48e85e2919@linaro.org>
On Sun, 15 Jan 2023 15:57:21 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> On 13/01/2023 20:49, Hugo Villeneuve wrote:
> > From: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> >
> > Add device tree bindings document for the Texas Instruments ADS7924
> > ADC.
> >
> > Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > ---
> > .../bindings/iio/adc/ti,ads7924.yaml | 112 ++++++++++++++++++
> > 1 file changed, 112 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads7924.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads7924.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads7924.yaml
> > new file mode 100644
> > index 000000000000..24bbf95383b4
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads7924.yaml
> > @@ -0,0 +1,112 @@
> > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/adc/ti,ads7924.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: TI ADS7924 4 channels 12 bits I2C analog to digital converter
> > +
> > +maintainers:
> > + - Hugo Villeneuve <hvilleneuve@dimonoff.com>
> > +
> > +description: |
> > + Texas Instruments ADS7924 4 channels 12 bits I2C analog to digital converter
> > +
> > + Specifications:
> > + https://www.ti.com/lit/gpn/ads7924
> > +
> > +properties:
> > + compatible:
> > + const: ti,ads7924
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + vref-supply:
> > + description:
> > + The regulator supply for the ADC reference voltage (AVDD)
> > +
> > + reset-gpios:
> > + maxItems: 1
> > +
> > + interrupts:
> > + maxItems: 1
> > +
> > + "#address-cells":
> > + const: 1
> > +
> > + "#size-cells":
> > + const: 0
> > +
> > + "#io-channel-cells":
> > + const: 1
> > +
> > +patternProperties:
> > + "^channel@[0-3]+$":
> > + $ref: adc.yaml
> > +
> > + description: |
> > + Represents the external channels which are connected to the ADC.
> > +
> > + properties:
> > + reg:
> > + description: |
> > + The channel number. It can have up to 4 channels numbered from 0 to 3.
> > + items:
> > + - minimum: 0
> > + maximum: 3
> > +
> > + label:
> > + description: |
> > + Unique name to identify the channel.
>
> Drop description, it's coming from adc.yaml. Just "label: true"
Done.
> > +
> > + required:
> > + - reg
> > +
> > + additionalProperties: false
>
> You are not allowing anything else from adc.yaml. Is it on purpose?
I am really not an expert with this Yaml stuff, and reading the documentation makes me probably more confused than before reading it :)
But one thing that is for sure is that these other properties in adc.yaml are not used in my driver:
bipolar
diff-channels
settling-time-us
oversampling-ratio
So is it Ok then to use "additionalProperties: false"? I think so, but what is your recommandation?
Thank you,
Hugo.
> > +
> > +additionalProperties: false
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - vref-supply
> > + - "#address-cells"
> > + - "#size-cells"
> > +
>
> Best regards,
> Krzysztof
>
>
--
Hugo Villeneuve <hugo@hugovil.com>
next prev parent reply other threads:[~2023-01-15 16:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 19:49 [PATCH v3 0/2] iio: adc: ti-ads7924: add Texas Instruments ADS7924 driver Hugo Villeneuve
2023-01-13 19:49 ` [PATCH v3 1/2] " Hugo Villeneuve
2023-01-14 16:28 ` Jonathan Cameron
2023-01-14 17:53 ` Hugo Villeneuve
2023-01-13 19:49 ` [PATCH v3 2/2] dt-bindings: iio: adc: add Texas Instruments ADS7924 Hugo Villeneuve
2023-01-15 14:57 ` Krzysztof Kozlowski
2023-01-15 16:22 ` Hugo Villeneuve [this message]
2023-01-15 16:43 ` Jonathan Cameron
2023-01-15 16:32 ` Hugo Villeneuve
2023-01-15 19:17 ` Krzysztof Kozlowski
2023-01-15 20:11 ` Hugo Villeneuve
2023-01-16 15:21 ` Jonathan Cameron
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=20230115112205.e46ab8d017b99dd987d003e4@hugovil.com \
--to=hugo@hugovil.com \
--cc=devicetree@vger.kernel.org \
--cc=hvilleneuve@dimonoff.com \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/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).