devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Guo <shawn.guo@linaro.org>
To: Rob Herring <robh@kernel.org>
Cc: Sebastian Reichel <sre@kernel.org>,
	Stephan Gerhold <stephan@gerhold.net>,
	Vinod Koul <vkoul@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH 1/3] dt-bindings: power: reset: Convert qcom,pon to DT schema
Date: Wed, 14 Jul 2021 19:47:26 +0800	[thread overview]
Message-ID: <20210714114725.GE11342@dragon> (raw)
In-Reply-To: <20210712154521.GA1987910@robh.at.kernel.org>

On Mon, Jul 12, 2021 at 09:45:21AM -0600, Rob Herring wrote:
> On Mon, Jul 05, 2021 at 10:50:30AM +0800, Shawn Guo wrote:
> > It converts qcom,pon DT bindings from legacy bare text to YAML format.
> > 
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > ---
> >  .../bindings/power/reset/qcom,pon.txt         | 49 -------------------
> >  .../bindings/power/reset/qcom,pon.yaml        | 49 +++++++++++++++++++
> >  2 files changed, 49 insertions(+), 49 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/power/reset/qcom,pon.txt
> >  create mode 100644 Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/power/reset/qcom,pon.txt b/Documentation/devicetree/bindings/power/reset/qcom,pon.txt
> > deleted file mode 100644
> > index 0c0dc3a1e693..000000000000
> > --- a/Documentation/devicetree/bindings/power/reset/qcom,pon.txt
> > +++ /dev/null
> > @@ -1,49 +0,0 @@
> > -Qualcomm PON Device
> > -
> > -The Power On device for Qualcomm PM8xxx is MFD supporting pwrkey
> > -and resin along with the Android reboot-mode.
> > -
> > -This DT node has pwrkey and resin as sub nodes.
> > -
> > -Required Properties:
> > --compatible: Must be one of:
> > -	"qcom,pm8916-pon"
> > -	"qcom,pms405-pon"
> > -	"qcom,pm8998-pon"
> > -
> > --reg: Specifies the physical address of the pon register
> > -
> > -Optional subnode:
> > --pwrkey: Specifies the subnode pwrkey and should follow the
> > - qcom,pm8941-pwrkey.txt description.
> > --resin: Specifies the subnode resin and should follow the
> > - qcom,pm8xxx-pwrkey.txt description.
> > -
> > -The rest of the properties should follow the generic reboot-mode description
> > -found in reboot-mode.txt
> > -
> > -Example:
> > -
> > -	pon@800 {
> > -		compatible = "qcom,pm8916-pon";
> > -
> > -		reg = <0x800>;
> > -		mode-bootloader = <0x2>;
> > -		mode-recovery = <0x1>;
> > -
> > -		pwrkey {
> > -			compatible = "qcom,pm8941-pwrkey";
> > -			interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
> > -			debounce = <15625>;
> > -			bias-pull-up;
> > -			linux,code = <KEY_POWER>;
> > -		};
> > -
> > -		resin {
> > -			compatible = "qcom,pm8941-resin";
> > -			interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
> > -			debounce = <15625>;
> > -			bias-pull-up;
> > -			linux,code = <KEY_VOLUMEDOWN>;
> > -		};
> > -	};
> > diff --git a/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
> > new file mode 100644
> > index 000000000000..7764c804af1d
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
> > @@ -0,0 +1,49 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/power/reset/qcom,pon.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Qualcomm PON Device
> > +
> > +maintainers:
> > +  - Vinod Koul <vkoul@kernel.org>
> > +
> > +description: |
> > +  The Power On device for Qualcomm PM8xxx is MFD supporting pwrkey
> > +  and resin along with the Android reboot-mode.
> 
> allOf:
>   - $ref: /schemas/power/reset/reboot-mode.yaml#
> 
> And then...
> 
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - qcom,pm8916-pon
> > +      - qcom,pms405-pon
> > +      - qcom,pm8998-pon
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +patternProperties:
> > +  "^mode-.+":
> > +    $ref: /schemas/types.yaml#/definitions/uint32
> > +    description: Vendor-specific mode value written to the mode register
> 
> Drop this.

Drop the description line only or the whole "^mode-.+" block?  I got the
following from dt_binding_check if dropping the whole block.

 pon@800: 'compatible', 'reg' do not match any of the regexes: '^mode-.*$', 'pinctrl-[0-9]+'

> 
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +additionalProperties: false
> 
> unevaluatedProperties: false

Replace additionalProperties with unevaluatedProperties, right?

Shawn

  reply	other threads:[~2021-07-14 11:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05  2:50 [PATCH 0/3] Add 'qcom,pon-reboot-not-used' support in PON driver Shawn Guo
2021-07-05  2:50 ` [PATCH 1/3] dt-bindings: power: reset: Convert qcom,pon to DT schema Shawn Guo
2021-07-12 15:45   ` Rob Herring
2021-07-14 11:47     ` Shawn Guo [this message]
2021-07-05  2:50 ` [PATCH 2/3] dt-bindings: qcom,pon: Add 'qcom,pon-reboot-not-used' property Shawn Guo
2021-07-12 17:08   ` Bjorn Andersson
2021-07-05  2:50 ` [PATCH 3/3] power: reset: qcom-pon: Add support for 'qcom,pon-reboot-not-used' Shawn Guo
2021-07-12 17:12   ` Bjorn Andersson
2021-07-14 11:49     ` Shawn Guo
  -- strict thread matches above, loose matches on Subject: below --
2021-07-04  7:40 [PATCH 0/3] Add 'qcom,mode-in-imem' support in PON driver Shawn Guo
2021-07-04  7:40 ` [PATCH 1/3] dt-bindings: power: reset: Convert qcom,pon to DT schema Shawn Guo

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=20210714114725.GE11342@dragon \
    --to=shawn.guo@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sre@kernel.org \
    --cc=stephan@gerhold.net \
    --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).