[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a35bdff4-601e-6186-584e-9a0b88cf3dbb@gmail.com>
Date: Sun, 15 Mar 2020 15:11:51 +0100
From: Johan Jonker <jbx6244@...il.com>
To: Jonathan Cameron <jic23@...nel.org>
Cc: knaack.h@....de, lars@...afoo.de, pmeerw@...erw.net,
heiko@...ech.de, robh+dt@...nel.org, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/3] dt-bindings: iio: adc: convert rockchip saradc
bindings to yaml
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@...il.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@...il.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?
>
Powered by blists - more mailing lists