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: Wed, 05 May 2021 10:38:46 +0530 [thread overview]
Message-ID: <a190e414c53af3ea094548f5011c3a04@codeaurora.org> (raw)
In-Reply-To: <20210427083721.heavcdadeb4ajkk2@earth.universe>
On 2021-04-27 14:07, Sebastian Reichel wrote:
> Hi,
>
> On Tue, Apr 27, 2021 at 11:45:44AM +0530, skakit@codeaurora.org wrote:
>> Hi Sebastian,
>>
>> On 2021-04-09 13:48, skakit@codeaurora.org wrote:
>> > Hi Sebastian,
>> >
>> > On 2021-04-08 18:30, Sebastian Reichel wrote:
>> > > Hi,
>> > >
>> > > On Thu, Apr 08, 2021 at 05:01:08PM +0530, satya priya wrote:
>> > > > Convert qcom PON binding from .txt to .yaml format.
>> > > >
>> > > > Signed-off-by: satya priya <skakit@codeaurora.org>
>> > > > ---
>> > >
>> > > Thanks for doing this.
>> > >
>> > > > Changes in V2:
>> > > > - As per Rob's comments, converted the main PON binding and
>> > > > added in V2.
>> > > >
>> [...]
>> > > > + reg:
>> > > > + description: Specifies the physical address of the pon register
>> > >
>> > > That description is obvious and pointless. Instead add
>> > >
>> > > maxItems: 1
>> > >
>> >
>> > Okay.
>> >
>> > > > + pwrkey:
>> > > > + type: object
>> > > > + $ref: "../../input/qcom,pm8941-pwrkey.yaml#"
>> > > > +
>> > > > + resin:
>> > > > + type: object
>> > > > + $ref: "../../input/qcom,pm8941-pwrkey.yaml#"
>> > > > +
>> > > > +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]+'
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
next prev parent reply other threads:[~2021-05-05 5:08 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 [this message]
2021-05-07 9:45 ` skakit
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=a190e414c53af3ea094548f5011c3a04@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).