From: Sebastian Reichel <sebastian.reichel@collabora.com> To: skakit@codeaurora.org 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: Tue, 27 Apr 2021 10:37:21 +0200 [thread overview] Message-ID: <20210427083721.heavcdadeb4ajkk2@earth.universe> (raw) In-Reply-To: <322cbdbb022fec3f43c1cbe13c532dd3@codeaurora.org> [-- Attachment #1: Type: text/plain, Size: 2678 bytes --] 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. 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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-04-27 8:37 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 [this message] 2021-05-05 5:08 ` skakit 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=20210427083721.heavcdadeb4ajkk2@earth.universe \ --to=sebastian.reichel@collabora.com \ --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=skakit@codeaurora.org \ --cc=vkoul@kernel.org \ --subject='Re: [PATCH V2 3/4] dt-bindings: power: reset: qcom-pon: Convert qcom PON binding to yaml' \ /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
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).