linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: skakit@codeaurora.org
To: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Rob Herring <robh+dt@kernel.org>, Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	David Collins <collinsd@codeaurora.org>,
	kgunda@codeaurora.org, Vinod Koul <vkoul@kernel.org>,
	Courtney Cavin <courtney.cavin@sonymobile.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH V2 3/4] dt-bindings: power: reset: qcom-pon: Convert qcom PON binding to yaml
Date: Fri, 07 May 2021 15:15:55 +0530	[thread overview]
Message-ID: <be3573974d76d7e464048b34854416ad@codeaurora.org> (raw)
In-Reply-To: <a190e414c53af3ea094548f5011c3a04@codeaurora.org>

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

  reply	other threads:[~2021-05-07  9:46 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 11:31 [PATCH V2 0/4] Add support for PMK8350 PON_HLOS PMIC peripheral satya priya
2021-04-08 11:31 ` [PATCH V2 1/4] input: pm8941-pwrkey: add " satya priya
2021-04-13  3:00   ` Bjorn Andersson
2021-04-08 11:31 ` [PATCH V2 2/4] dt-bindings: input: pm8941-pwrkey: add pmk8350 compatible strings satya priya
2021-04-09 18:46   ` Rob Herring
2021-04-08 11:31 ` [PATCH V2 3/4] dt-bindings: power: reset: qcom-pon: Convert qcom PON binding to yaml satya priya
2021-04-08 13:00   ` Sebastian Reichel
2021-04-09  8:18     ` skakit
2021-04-09 11:57       ` Sebastian Reichel
2021-04-09 13:38         ` skakit
2021-04-27  6:15       ` skakit
2021-04-27  8:37         ` Sebastian Reichel
2021-05-05  5:08           ` skakit
2021-05-07  9:45             ` skakit [this message]
2021-05-07 11:29               ` Sebastian Reichel
2021-04-08 11:31 ` [PATCH V2 4/4] dt-bindings: input: pm8941-pwrkey: Convert pm8941 power key " satya priya
2021-04-09 18:50   ` Rob Herring
2021-04-21  6:23     ` skakit

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=be3573974d76d7e464048b34854416ad@codeaurora.org \
    --to=skakit@codeaurora.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=collinsd@codeaurora.org \
    --cc=courtney.cavin@sonymobile.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kgunda@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=vkoul@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).