[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <be3573974d76d7e464048b34854416ad@codeaurora.org>
Date: Fri, 07 May 2021 15:15:55 +0530
From: skakit@...eaurora.org
To: Sebastian Reichel <sebastian.reichel@...labora.com>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
David Collins <collinsd@...eaurora.org>, kgunda@...eaurora.org,
Vinod Koul <vkoul@...nel.org>,
Courtney Cavin <courtney.cavin@...ymobile.com>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-msm@...r.kernel.org,
linux-pm@...r.kernel.org
Subject: Re: [PATCH V2 3/4] dt-bindings: power: reset: qcom-pon: Convert qcom
PON binding to yaml
Hi,
[...]
>>> > > > +
>>> > > > +required:
>>> > > > + - compatible
>>> > > > + - reg
>>> > > > +
>>> > > > +additionalProperties: true
>>> > >
>>> > > Instead of allowing arbitrary properties, only valid modes
>>> > > should be allowed. So drop additionalProperties and do this
>>> > > instead:
>>> > >
>>> > > allOf:
>>> > > - $ref: reboot-mode.yaml#
>>> > >
>>> > > unevaluatedProperties: false
>>> > >
>>> >
>>> > Okay.
>>>
>>> I am not able to use 'allOf' to refer reboot-mode.yaml as some of the
>>> properties do not match with reboot-mode.yaml properties. Can we use
>>> oneOf
>>> like below?
>>>
>>> oneOf:
>>> - $ref: "reboot-mode.yaml#"
>>> - $ref: "../../input/qcom,pm8941-pwrkey.yaml#"
>>
>> That does not make sense.
>>
>> The reference to reboot-mode.yaml is needed because it adds valid
>> mode properties, so that you can set unevaluatedProperties to false.
>> You need it at the root of the PON binding. They are not added to
>> the required list, so it's fine if not all of them are used. Also
>> there can (and usually is) more than one mode, so using oneOf is not
>> ok.
>>
>
> Okay, but I am getting errors like below during make dtbs_check.
>
> kernel/arch/arm64/boot/dts/qcom/sdm630-sony-xperia-ganges-kirin.dt.yaml:
> pon@800: 'compatible', 'pwrkey', 'reg' do not match any of the
> regexes: '^mode-.*$', 'pinctrl-[0-9]+'
>
Seems like I have to make 'additionalProperties' as true in
reboot-mode.yaml
I have checked other yaml binding docs where allOf is used, and they
have 'additionalProperties' as true in the file which is being referred.
Please let me know if this is not correct way to do it.
> As suggested I have added
>
> allOf:
> - $ref: reboot-mode.yaml#
>
> at the root of binding and also added unevaluatedProperties: false
>
>> Last but not least the pwrkey reference is needed to describe
>> specific nodes (resin, pwrkey) and should not appear at the root
>> of the PON binding.
>>
>>> Also, If I drop additionalProperties I am getting below error.
>>>
>>> kernel/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml:
>>> 'additionalProperties' is a required property
>>
>> You need to add 'unevaluatedProperties: false'. It is basically
>> the same as 'additionalProperties: false', but also accepts
>> properties from the referenced bindings.
>>
>> Thanks,
>>
>> -- Sebastian
Thanks,
Satya Priya
Powered by blists - more mailing lists