From: Johan Jonker <jbx6244@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net,
heiko@sntech.de, robh+dt@kernel.org, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/3] dt-bindings: iio: adc: convert rockchip saradc bindings to yaml
Date: Sun, 15 Mar 2020 15:11:51 +0100 [thread overview]
Message-ID: <a35bdff4-601e-6186-584e-9a0b88cf3dbb@gmail.com> (raw)
In-Reply-To: <20200315112223.07dd863b@archlinux>
Hi Jonathan,
For compatible strings with identical fallback we use 'enum' to combine,
so instead of 3 only 1 additional line is needed for each new SoC patch.
properties:
compatible:
oneOf:
- const: rockchip,saradc
- const: rockchip,rk3066-tsadc
- const: rockchip,rk3399-saradc
- items:
- enum:
- rockchip,px30-saradc
- rockchip,rk3308-saradc
- rockchip,rk3328-saradc
- rockchip,rv1108-saradc
- const: rockchip,rk3399-saradc
[..]
vs
[..]
properties:
compatible:
oneOf:
- const: rockchip,saradc
- const: rockchip,rk3066-tsadc
- const: rockchip,rk3399-saradc
- items:
- const: rockchip,px30-saradc
- const: rockchip,rk3399-saradc
- items:
- const: rockchip,rk3308-saradc
- const: rockchip,rk3399-saradc
- items:
- const: rockchip,rk3328-saradc
- const: rockchip,rk3399-saradc
- items:
- const: rockchip,rv1108-saradc
- const: rockchip,rk3399-saradc
Check with:
make ARCH=arm menuconfig
# select Rockchip platform
make -k ARCH=arm64 dt_binding_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
make -k ARCH=arm dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
make ARCH=arm64 menuconfig
# select Rockchip platform
make -k ARCH=arm64 dtbs_check
DT_SCHEMA_FILES=Documentation/devicetree/bindings/iio/adc/rockchip-saradc.yaml
Caution with:
'allOf' and 'additionalProperties: false'
does not completely validate DTS or examples!
On 3/15/20 12:22 PM, Jonathan Cameron wrote:
> On Fri, 13 Mar 2020 14:29:24 +0100
> Johan Jonker <jbx6244@gmail.com> wrote:
>
>> Current dts files with 'saradc' nodes are manually verified.
>> In order to automate this process rockchip-saradc.txt
>> has to be converted to yaml.
>>
>> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
>
> Hi Johan,
>
> A question inline which may just be my lack of yaml knowledge
> showing itself!
>
> Jonathan
>
>> +properties:
>> + compatible:
>> + oneOf:
>> + - const: rockchip,saradc
>> + - const: rockchip,rk3066-tsadc
>> + - const: rockchip,rk3399-saradc
>> + - items:
>> + - enum:
>> + - rockchip,rk3328-saradc
>> + - rockchip,rv1108-saradc
>> + - const: rockchip,rk3399-saradc
>
> My yaml knowledge isn't great. Why do we have this nested
> structure rather than a straight forward list?
>
next prev parent reply other threads:[~2020-03-15 14:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-13 13:29 [PATCH v1 1/3] dt-bindings: iio: adc: convert rockchip saradc bindings to yaml Johan Jonker
2020-03-13 13:29 ` [PATCH v1 2/3] dt-bindings: iio: adc: rockchip-saradc: add description for rk3308 Johan Jonker
2020-03-30 18:10 ` Rob Herring
2020-04-04 14:02 ` Jonathan Cameron
2020-03-13 13:29 ` [PATCH v1 3/3] dt-bindings: iio: adc: rockchip-saradc: add description for px30 Johan Jonker
2020-03-30 18:11 ` Rob Herring
2020-04-04 14:02 ` Jonathan Cameron
2020-03-15 11:22 ` [PATCH v1 1/3] dt-bindings: iio: adc: convert rockchip saradc bindings to yaml Jonathan Cameron
2020-03-15 14:09 ` Heiko Stübner
2020-03-15 14:31 ` Jonathan Cameron
2020-03-15 14:11 ` Johan Jonker [this message]
2020-03-30 18:10 ` Rob Herring
2020-04-04 14:01 ` 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=a35bdff4-601e-6186-584e-9a0b88cf3dbb@gmail.com \
--to=jbx6244@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=jic23@kernel.org \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=pmeerw@pmeerw.net \
--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).