diff mbox series

[RFC,1/2] dt-bindings: soc: qcom: Add SDPM clock monitor driver documentation in yaml

Message ID 1617346747-8611-2-git-send-email-manafm@codeaurora.org (mailing list archive)
State New, archived
Headers show
Series Add SDPM clock monitor driver | expand

Commit Message

Manaf Meethalavalappu Pallikunhi April 2, 2021, 6:59 a.m. UTC
Add yaml documentation for SDPM clock monitor driver which will
register for clock rate change notification and writes the clock rate
into SDPM CSR register.

Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
---
 .../devicetree/bindings/soc/qcom/qcom-sdpm.yaml    | 68 ++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml

Comments

Rob Herring (Arm) April 6, 2021, 1:24 p.m. UTC | #1
On Fri, 02 Apr 2021 12:29:06 +0530, Manaf Meethalavalappu Pallikunhi wrote:
> Add yaml documentation for SDPM clock monitor driver which will
> register for clock rate change notification and writes the clock rate
> into SDPM CSR register.
> 
> Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
> Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
> ---
>  .../devicetree/bindings/soc/qcom/qcom-sdpm.yaml    | 68 ++++++++++++++++++++++
>  1 file changed, 68 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:
./Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml:31:11: [error] empty value in block mapping (empty-values)
./Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml:37:11: [error] empty value in block mapping (empty-values)

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml: properties:clock-names:items: 'anyOf' conditional failed, one must be fixed:
	None is not of type 'object', 'boolean'
	None is not of type 'array'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml: properties:clocks:items: 'anyOf' conditional failed, one must be fixed:
	None is not of type 'object', 'boolean'
	None is not of type 'array'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml: properties:clock-names:items: 'oneOf' conditional failed, one must be fixed:
	None is not of type 'object'
	None is not of type 'array'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml: properties:clocks:items: 'oneOf' conditional failed, one must be fixed:
	None is not of type 'object'
	None is not of type 'array'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml: 'additionalProperties' is a required property
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml: properties:clock-names:items: 'oneOf' conditional failed, one must be fixed:
	None is not of type 'object'
	None is not of type 'array'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml: properties:clocks: 'oneOf' conditional failed, one must be fixed:
	/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml: properties:clocks: 'anyOf' conditional failed, one must be fixed:
		'items' is not one of ['maxItems', 'description', 'deprecated']
		'minItems' is not one of ['maxItems', 'description', 'deprecated']
		'items' is not one of ['description', 'deprecated', 'const', 'enum', 'minimum', 'maximum', 'multipleOf', 'default', '$ref']
		'minItems' is not one of ['description', 'deprecated', 'const', 'enum', 'minimum', 'maximum', 'multipleOf', 'default', '$ref']
		'maxItems' is not one of ['description', 'deprecated', 'const', 'enum', 'minimum', 'maximum', 'multipleOf', 'default', '$ref']
		/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml: properties:clocks:items: 'oneOf' conditional failed, one must be fixed:
			None is not of type 'object'
			None is not of type 'array'
		1 was expected
	'items' is not one of ['type', 'description', 'dependencies', 'properties', 'patternProperties', 'additionalProperties', 'unevaluatedProperties', 'deprecated', 'required', 'allOf', 'anyOf', 'oneOf', '$ref']
	'minItems' is not one of ['type', 'description', 'dependencies', 'properties', 'patternProperties', 'additionalProperties', 'unevaluatedProperties', 'deprecated', 'required', 'allOf', 'anyOf', 'oneOf', '$ref']
	'maxItems' is not one of ['type', 'description', 'dependencies', 'properties', 'patternProperties', 'additionalProperties', 'unevaluatedProperties', 'deprecated', 'required', 'allOf', 'anyOf', 'oneOf', '$ref']
	'type' is a required property
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml: ignoring, error in schema: properties: clocks: items
warning: no schema found in file: ./Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml
Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.example.dts:19:18: fatal error: dt-bindings/clock/qcom,camcc-sc7280.h: No such file or directory
   19 |         #include <dt-bindings/clock/qcom,camcc-sc7280.h>
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.lib:377: Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.example.dt.yaml] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1414: dt_binding_check] Error 2

See https://patchwork.ozlabs.org/patch/1461582

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml
new file mode 100644
index 00000000..20df362
--- /dev/null
+++ b/Documentation/devicetree/bindings/soc/qcom/qcom-sdpm.yaml
@@ -0,0 +1,68 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/qcom/qcom-sdpm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Simple Digital Power Meter(SDPM) clock monitoring
+
+maintainers:
+  - Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
+  - Ram Chandrasekar <rkumbako@codeaurora.org>
+
+description: |
+
+  SDPM is used to monitor the operating frequency of different clocks and based
+  on operating levels of different clients, RDPM (Rail Digital Power Meter)
+  hardware estimates total power consumption of a shared railway. The SDPM
+  clock monitor driver will register with the clock framework for rate change
+  notification of different clocks. These clock rate will be updated to SDPM.
+
+properties:
+  compatible:
+    enum:
+      - qcom,sdpm
+
+  reg:
+    items:
+      - description: RDPM hardware base address
+
+  clocks:
+    items:
+    minItems: 1
+    maxItems: 8
+    description: Different clock source
+
+  clock-names:
+    items:
+    minItems: 1
+    maxItems: 8
+    description: Different clock source name
+
+  csr-id:
+    $ref: '/schemas/types.yaml#/definitions/uint32-array'
+    description: SDPM CSR IDs matching the clock order mentioned in the
+                 clocks property.
+    minItems: 1
+    maxItems: 8
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - csr-id
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,camcc-sc7280.h>
+    #include <dt-bindings/clock/qcom,gcc-sc7280.h>
+    cx_sdpm@634000 {
+        compatible = "qcom,sdpm";
+        reg = <0x634000 0x1000>;
+        clocks = <&clock_camcc CAM_CC_IPE_0_CLK_SRC>,
+                <&clock_gcc GCC_GP1_CLK_SRC>;
+        clock-names = "cam_cc_ipe", "gcc_gp1";
+        csr-id = <5 7>;
+    };
+...