Re: [PATCH v3 1/4] dt-bindings: nvmem: qfprom: Convert to yaml

From: Ravi Kumar Bokka (Temp)
Date: Wed Jun 17 2020 - 12:27:08 EST




On 6/17/2020 8:48 PM, Srinivas Kandagatla wrote:


On 17/06/2020 15:51, Douglas Anderson wrote:
From: Ravi Kumar Bokka <rbokka@xxxxxxxxxxxxxx>

This switches the bindings over from txt to yaml.

Signed-off-by: Ravi Kumar Bokka <rbokka@xxxxxxxxxxxxxx>
Signed-off-by: Douglas Anderson <dianders@xxxxxxxxxxxx>
---

Changes in v3:
- Split conversion to yaml into separate patch new in v3.
- Use 'const' for compatible instead of a 1-entry enum.
- Changed filename to match compatible string.
- Add #address-cells and #size-cells to list of properties.
- Fixed up example.

 .../bindings/nvmem/qcom,qfprom.yaml | 45 +++++++++++++++++++
 .../devicetree/bindings/nvmem/qfprom.txt | 35 ---------------
 2 files changed, 45 insertions(+), 35 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
 delete mode 100644 Documentation/devicetree/bindings/nvmem/qfprom.txt

diff --git a/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
new file mode 100644
index 000000000000..5efa5e7c4d81
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/qcom,qfprom.yaml
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/qcom,qfprom.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Technologies Inc, QFPROM Efuse bindings
+
+maintainers:
+Â - Ravi Kumar Bokka <rbokka@xxxxxxxxxxxxxx>
+

Am not sure this was intentional, but the old maintainer name is totally lost in this patch!

Please fix this!


Hi Srinivas,
The existed qfprom dt-bindings in .txt format.
I will make it as it is to merge whole content in .yaml format once confirm all the parameters with this new driver changes.



+allOf:
+Â - $ref: "nvmem.yaml#"
+
+properties:
+Â compatible:
+ÂÂÂ const: qcom,qfprom
+
+Â reg:
+ÂÂÂ items:
+ÂÂÂÂÂ - description: The corrected region.
+
+Â # Needed if any child nodes are present.
+Â "#address-cells":
+ÂÂÂ const: 1
+Â "#size-cells":
+ÂÂÂ const: 1
+
+required:
+ÂÂ - compatible
+ÂÂ - reg
+
+examples:
+Â - |
+ÂÂÂ efuse@784000 {
+ÂÂÂÂÂ compatible = "qcom,qfprom";
+ÂÂÂÂÂ reg = <0 0x00784000 0 0x8ff>;
+ÂÂÂÂÂ #address-cells = <1>;
+ÂÂÂÂÂ #size-cells = <1>;
+
+ÂÂÂÂÂ hstx-trim-primary@1eb {
+ÂÂÂÂÂÂÂ reg = <0x1eb 0x1>;
+ÂÂÂÂÂÂÂ bits = <1 4>;
+ÂÂÂÂÂ };
+ÂÂÂ };
diff --git a/Documentation/devicetree/bindings/nvmem/qfprom.txt b/Documentation/devicetree/bindings/nvmem/qfprom.txt
deleted file mode 100644
index 26fe878d5c86..000000000000
--- a/Documentation/devicetree/bindings/nvmem/qfprom.txt
+++ /dev/null
@@ -1,35 +0,0 @@
-= Qualcomm QFPROM device tree bindings =
-
-This binding is intended to represent QFPROM which is found in most QCOM SOCs.
-
-Required properties:
-- compatible: should be "qcom,qfprom"
-- reg: Should contain registers location and length
-
-= Data cells =
-Are child nodes of qfprom, bindings of which as described in
-bindings/nvmem/nvmem.txt
-
-Example:
-
-ÂÂÂ qfprom: qfprom@700000 {
-ÂÂÂÂÂÂÂ compatibleÂÂÂÂ = "qcom,qfprom";
-ÂÂÂÂÂÂÂ regÂÂÂÂÂÂÂ = <0x00700000 0x8000>;
-ÂÂÂÂÂÂÂ ...
-ÂÂÂÂÂÂÂ /* Data cells */
-ÂÂÂÂÂÂÂ tsens_calibration: calib@404 {
-ÂÂÂÂÂÂÂÂÂÂÂ reg = <0x4404 0x10>;
-ÂÂÂÂÂÂÂ };
-ÂÂÂ };
-
-
-= Data consumers =
-Are device nodes which consume nvmem data cells.
-
-For example:
-
-ÂÂÂ tsens {
-ÂÂÂÂÂÂÂ ...
-ÂÂÂÂÂÂÂ nvmem-cells = <&tsens_calibration>;
-ÂÂÂÂÂÂÂ nvmem-cell-names = "calibration";
-ÂÂÂ };


--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by the Linux Foundation.