From: Joel Stanley <joel@jms.id.au>
To: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
linux-iio@vger.kernel.org, Rob Herring <robh@kernel.org>,
devicetree <devicetree@vger.kernel.org>,
Rick Altherr <raltherr@google.com>,
Andrew Jeffery <andrew@aj.id.au>
Subject: Re: [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 yaml conversion
Date: Wed, 16 Sep 2020 12:39:36 +0000 [thread overview]
Message-ID: <CACPK8Xdb2um+DN9q9P7o2AppYHenYoZ607r-s36BvZET=QCwiw@mail.gmail.com> (raw)
In-Reply-To: <20200916113625.0000641e@Huawei.com>
On Wed, 16 Sep 2020 at 10:38, Jonathan Cameron
<Jonathan.Cameron@huawei.com> wrote:
>
> On Thu, 10 Sep 2020 02:32:19 +0000
> Joel Stanley <joel@jms.id.au> wrote:
>
> > On Wed, 9 Sep 2020 at 18:02, Jonathan Cameron <jic23@kernel.org> wrote:
> > >
> > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > >
> > > Simple txt to yaml conversion. Part of a general move to convert
> > > all the IIO bindings over to yaml.
> > >
> > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > Cc: Rick Altherr <raltherr@google.com>
> > > Cc: Joel Stanley <joel@jms.id.au>
> > > Cc: Andrew Jeffery <andrew@aj.id.au>
> >
> > Acked-by: Joel Stanley <joel@jms.id.au>
> >
> >
> > > ---
> > > .../bindings/iio/adc/aspeed,ast2400-adc.yaml | 54 +++++++++++++++++++
> > > .../bindings/iio/adc/aspeed_adc.txt | 22 --------
> > > 2 files changed, 54 insertions(+), 22 deletions(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
> > > new file mode 100644
> > > index 000000000000..09018487d690
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/iio/adc/aspeed,ast2400-adc.yaml
> >
> > This naming doesn't make sense, as the bindings are for the ast2500
> > too (and they also apply for the ast2600).
>
> Convention is to name after a supported device and not use
> wild cards or generic names because the chances of it going
> wrong in future is far too high. Will every aspeed adc look the same?
> Seems impossible to predict so best we can do safely is to pick a
> part number.
It already supports three different generations of SoC, which I was
bringing to your attention. Therefore having the name '2400' is
already incorrect.
>
> There are enormous numbers of examples of this in dt bindings and
> for that matter driver naming.
>
> Thanks,
>
> Jonathan
>
>
> >
> > > @@ -0,0 +1,54 @@
> > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/iio/adc/aspeed,ast2400-adc.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: ADC that forms part of an ASPEED server management processor.
> > > +
> > > +maintainers:
> > > + - Rick Altherr <raltherr@google.com>
> > > +
> > > +description:
> > > + This device is a 10-bit converter for 16 voltage channels. All inputs are
> > > + single ended.
> > > +
> > > +properties:
> > > + compatible:
> > > + enum:
> > > + - aspeed,ast2400-adc
> > > + - aspeed,ast2500-adc
> > > +
> > > + reg:
> > > + maxItems: 1
> > > +
> > > + clocks:
> > > + description:
> > > + Input clock used to derive the sample clock. Expected to be the
> > > + SoC's APB clock.
> > > +
> > > + resets: true
> > > +
> > > + "#io-channel-cells":
> > > + const: 1
> > > +
> > > +required:
> > > + - compatible
> > > + - reg
> > > + - clocks
> > > + - resets
> > > + - "#io-channel-cells"
> > > +
> > > +additionalProperties: false
> > > +
> > > +examples:
> > > + - |
> > > + #include <dt-bindings/clock/aspeed-clock.h>
> > > + adc@1e6e9000 {
> > > + compatible = "aspeed,ast2400-adc";
> > > + reg = <0x1e6e9000 0xb0>;
> > > + clocks = <&syscon ASPEED_CLK_APB>;
> > > + resets = <&syscon ASPEED_RESET_ADC>;
> > > + #io-channel-cells = <1>;
> > > + };
> > > +...
> > > diff --git a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt b/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> > > deleted file mode 100644
> > > index 034fc2ba100e..000000000000
> > > --- a/Documentation/devicetree/bindings/iio/adc/aspeed_adc.txt
> > > +++ /dev/null
> > > @@ -1,22 +0,0 @@
> > > -Aspeed ADC
> > > -
> > > -This device is a 10-bit converter for 16 voltage channels. All inputs are
> > > -single ended.
> > > -
> > > -Required properties:
> > > -- compatible: Should be "aspeed,ast2400-adc" or "aspeed,ast2500-adc"
> > > -- reg: memory window mapping address and length
> > > -- clocks: Input clock used to derive the sample clock. Expected to be the
> > > - SoC's APB clock.
> > > -- resets: Reset controller phandle
> > > -- #io-channel-cells: Must be set to <1> to indicate channels are selected
> > > - by index.
> > > -
> > > -Example:
> > > - adc@1e6e9000 {
> > > - compatible = "aspeed,ast2400-adc";
> > > - reg = <0x1e6e9000 0xb0>;
> > > - clocks = <&syscon ASPEED_CLK_APB>;
> > > - resets = <&syscon ASPEED_RESET_ADC>;
> > > - #io-channel-cells = <1>;
> > > - };
> > > --
> > > 2.28.0
> > >
>
>
next prev parent reply other threads:[~2020-09-16 15:47 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 17:59 [PATCH v2 00/20] dt-bindings:iio:adc: Another set of yaml conversions Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 01/20] dt-bindings:iio:adc:fsl,vf610-adc conversion to yaml Jonathan Cameron
2020-09-15 19:00 ` Rob Herring
2020-09-15 20:45 ` Rob Herring
2020-09-16 10:34 ` Jonathan Cameron
2020-09-17 2:24 ` Andy Duan
2020-09-19 13:33 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 02/20] dt-bindings:iio:adc:ti,twl4030-madc yaml conversion Jonathan Cameron
2020-09-15 19:01 ` Rob Herring
2020-09-19 13:42 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 03/20] dt-bindings:iio:adc:st,stmpe-adc " Jonathan Cameron
2020-09-15 19:02 ` Rob Herring
2020-09-19 13:44 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 04/20] dt-bindings:iio:adc: aspeed,ast2400 " Jonathan Cameron
2020-09-10 2:32 ` Joel Stanley
2020-09-16 10:36 ` Jonathan Cameron
2020-09-16 12:39 ` Joel Stanley [this message]
2020-09-16 14:17 ` Jonathan Cameron
2020-09-19 13:47 ` Jonathan Cameron
2020-09-19 13:52 ` Jonathan Cameron
2020-09-15 19:03 ` Rob Herring
2020-09-09 17:59 ` [PATCH v2 05/20] dt-bindings:iio:adc:marvell,berlin2-adc " Jonathan Cameron
2020-09-15 19:04 ` Rob Herring
2020-09-19 13:55 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 06/20] dt-bindings:iio:adc:sprd,sc2720-adc " Jonathan Cameron
2020-09-15 19:05 ` Rob Herring
2020-09-19 13:57 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 07/20] dt-bindings:iio:adc:nuvoton,nau7802 " Jonathan Cameron
2020-09-09 19:19 ` Alexandre Belloni
2020-09-10 7:57 ` Jonathan Cameron
2020-09-15 19:06 ` Rob Herring
2020-09-19 14:01 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 08/20] dt-bindings:iio:adc:nuvoton,npcm750-adc " Jonathan Cameron
2020-09-15 19:07 ` Rob Herring
2020-09-19 14:03 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 09/20] dt-bindings:iio:adc:nxp,lpc1850-adc " Jonathan Cameron
2020-09-15 19:07 ` Rob Herring
2020-09-19 14:20 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 10/20] dt-bindings:iio:adc:lpc3220-adc " Jonathan Cameron
2020-09-15 19:09 ` Rob Herring
2020-09-19 14:22 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 11/20] dt-bindings:iio:adc:motorola,cpcap-adc " Jonathan Cameron
2020-09-15 19:11 ` Rob Herring
2020-09-19 14:25 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 12/20] dt-bindings:iio:adc:dlg,da9150-gpadc " Jonathan Cameron
2020-09-15 19:12 ` Rob Herring
2020-09-19 14:57 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 13/20] dt-bindings:iio:adc:cosmic,10001-adc " Jonathan Cameron
2020-09-15 19:13 ` Rob Herring
2020-09-19 14:07 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 14/20] dt-bindings:iio:adc:adi,ad7949 " Jonathan Cameron
2020-09-15 19:13 ` Rob Herring
2020-09-19 14:59 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 15/20] dt-bindings:iio:adc:ad7768-1 " Jonathan Cameron
2020-09-15 19:15 ` Rob Herring
2020-09-19 15:01 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 16/20] dt-bindings:iio:adc:ti,ads1015 " Jonathan Cameron
2020-09-15 19:16 ` Rob Herring
2020-09-19 14:12 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 17/20] dt-bindings:iio:adc:holt,hi8435 " Jonathan Cameron
2020-09-15 19:17 ` Rob Herring
2020-09-19 15:03 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 18/20] dt-bindings:iio:adc:amlogic,meson-saradc " Jonathan Cameron
2020-09-15 19:23 ` Rob Herring
2020-09-15 19:31 ` Martin Blumenstingl
2020-09-09 17:59 ` [PATCH v2 19/20] dt-bindings:iio:adc:fsl,imx7d-adc " Jonathan Cameron
2020-09-15 19:24 ` Rob Herring
2020-09-16 10:27 ` Jonathan Cameron
2020-09-19 14:14 ` Jonathan Cameron
2020-09-09 17:59 ` [PATCH v2 20/20] dt-bindings:iio:adc:fsl,imx25-gcq " Jonathan Cameron
2020-09-15 19:26 ` Rob Herring
2020-09-16 10:33 ` Jonathan Cameron
2020-09-16 10:38 ` Jonathan Cameron
2020-09-19 14:19 ` 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='CACPK8Xdb2um+DN9q9P7o2AppYHenYoZ607r-s36BvZET=QCwiw@mail.gmail.com' \
--to=joel@jms.id.au \
--cc=Jonathan.Cameron@huawei.com \
--cc=andrew@aj.id.au \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=raltherr@google.com \
--cc=robh@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).