Linux-ARM-MSM Archive on lore.kernel.org
 help / color / Atom feed
From: satya priya <skakit@codeaurora.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Sebastian Reichel <sre@kernel.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: David Collins <collinsd@codeaurora.org>,
	kgunda@codeaurora.org, linux-input@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	Courtney Cavin <courtney.cavin@sonymobile.com>,
	Vinod Koul <vkoul@kernel.org>, Andy Yan <andy.yan@rock-chips.com>,
	satya priya <skakit@codeaurora.org>
Subject: [PATCH V3 5/5] dt-bindings: power: reset: qcom-pon: Convert qcom PON binding to yaml
Date: Mon, 10 May 2021 12:31:04 +0530
Message-ID: <1620630064-16354-6-git-send-email-skakit@codeaurora.org> (raw)
In-Reply-To: <1620630064-16354-1-git-send-email-skakit@codeaurora.org>

Convert qcom PON binding from .txt to .yaml format.

The example has been removed in favour of full example being
available in the qcom,pm8941-pwrkey binding.

Signed-off-by: satya priya <skakit@codeaurora.org>
---
Changes in V2:
 - As per Rob's comments, converted the main PON binding and added in V2.

Changes in V3:
 - As per Sebastian's comments, added allOf to refer reboot-mode.yaml and
   used unevaluatedProperties = false. Added maxItems for reg.

 .../devicetree/bindings/power/reset/qcom,pon.txt   | 49 ----------------------
 .../devicetree/bindings/power/reset/qcom,pon.yaml  | 44 +++++++++++++++++++
 2 files changed, 44 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 0c0dc3a..0000000
--- 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 0000000..439f082
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/reset/qcom,pon.yaml
@@ -0,0 +1,44 @@
+# SPDX-License-Identifier: (GPL-2.0 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.
+
+  This DT node has pwrkey and resin as sub nodes.
+
+allOf:
+  - $ref: reboot-mode.yaml#
+
+properties:
+  compatible:
+    enum:
+      - qcom,pm8916-pon
+      - qcom,pms405-pon
+      - qcom,pm8998-pon
+
+  reg:
+    maxItems: 1
+
+  pwrkey:
+    type: object
+    $ref: "../../input/qcom,pm8941-pwrkey.yaml#"
+
+  resin:
+    type: object
+    $ref: "../../input/qcom,pm8941-pwrkey.yaml#"
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+...
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation


  parent reply index

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-10  7:00 [PATCH V3 0/5] Add support for PMK8350 PON_HLOS PMIC peripheral satya priya
2021-05-10  7:01 ` [PATCH V3 1/5] input: pm8941-pwrkey: add " satya priya
2021-06-02  4:36   ` Dmitry Torokhov
2021-05-10  7:01 ` [PATCH V3 2/5] dt-bindings: input: pm8941-pwrkey: add pmk8350 compatible strings satya priya
2021-06-02  4:36   ` Dmitry Torokhov
2021-05-10  7:01 ` [PATCH V3 3/5] dt-bindings: power: reset: Change 'additionalProperties' to true satya priya
2021-05-10 16:20   ` Rob Herring
2021-06-04 11:08     ` Sebastian Reichel
2021-05-10  7:01 ` [PATCH V3 4/5] dt-bindings: input: pm8941-pwrkey: Convert pm8941 power key binding to yaml satya priya
2021-05-10 14:01   ` Rob Herring
2021-05-10 16:24     ` Rob Herring
2021-05-12  4:47       ` skakit
2021-06-02  4:37         ` Dmitry Torokhov
2021-06-02 10:31           ` skakit
2021-05-10  7:01 ` satya priya [this message]
2021-05-10 16:25   ` [PATCH V3 5/5] dt-bindings: power: reset: qcom-pon: Convert qcom PON " Rob Herring
2021-06-04 11:09     ` Sebastian Reichel
2021-06-04 11:42       ` skakit
2021-06-04 11:45         ` skakit
2021-06-04 11:58           ` Sebastian Reichel

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=1620630064-16354-6-git-send-email-skakit@codeaurora.org \
    --to=skakit@codeaurora.org \
    --cc=agross@kernel.org \
    --cc=andy.yan@rock-chips.com \
    --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=sre@kernel.org \
    --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

Linux-ARM-MSM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-msm/0 linux-arm-msm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-msm linux-arm-msm/ https://lore.kernel.org/linux-arm-msm \
		linux-arm-msm@vger.kernel.org
	public-inbox-index linux-arm-msm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-arm-msm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git