diff mbox series

[v2,1/3] dt-bindings: Add dt bindings for flex noc Performance Monitor

Message ID 19bb1ad0783e66aef45b140ccf409917ef94e63b.1575609926.git.shubhrajyoti.datta@xilinx.com
State Not Applicable, archived
Headers show
Series [v2,1/3] dt-bindings: Add dt bindings for flex noc Performance Monitor | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema success

Commit Message

Shubhrajyoti Datta Dec. 6, 2019, 5:39 a.m. UTC
From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>

Add dt bindings for flexnoc Performance Monitor.
The flexnoc counters for read and write response and requests are
supported.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
---
changes from RFC:
moved to schema / yaml
v2:
Add additionalProperties
Update the License

 .../devicetree/bindings/perf/xlnx-flexnoc-pm.yaml  | 46 ++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/perf/xlnx-flexnoc-pm.yaml

Comments

Rob Herring Dec. 18, 2019, 10:27 p.m. UTC | #1
On Fri,  6 Dec 2019 11:09:56 +0530, shubhrajyoti.datta@gmail.com wrote:
> From: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> 
> Add dt bindings for flexnoc Performance Monitor.
> The flexnoc counters for read and write response and requests are
> supported.
> 
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
> ---
> changes from RFC:
> moved to schema / yaml
> v2:
> Add additionalProperties
> Update the License
> 
>  .../devicetree/bindings/perf/xlnx-flexnoc-pm.yaml  | 46 ++++++++++++++++++++++
>  1 file changed, 46 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/perf/xlnx-flexnoc-pm.yaml
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Greg Kroah-Hartman Dec. 19, 2019, 5:21 p.m. UTC | #2
On Fri, Dec 06, 2019 at 11:09:57AM +0530, shubhrajyoti.datta@gmail.com wrote:
> +/**
> + * xflex_remove - Driver remove function
> + * @pdev: Pointer to the platform_device structure
> + *
> + * This function frees all the resources allocated to the device.
> + *
> + * Return: 0 always
> + */

No need for kerneldoc documentation for static functions.

> +static int xflex_remove(struct platform_device *pdev)
> +{
> +	sysfs_remove_groups(&pdev->dev.kobj, xflex_groups);

Your attribute groups can, and should, be automatically created by the
driver core.  Set the driver's dev_groups pointer and that will happen
for you.

thanks,

greg k-h
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/perf/xlnx-flexnoc-pm.yaml b/Documentation/devicetree/bindings/perf/xlnx-flexnoc-pm.yaml
new file mode 100644
index 0000000..39c54c7
--- /dev/null
+++ b/Documentation/devicetree/bindings/perf/xlnx-flexnoc-pm.yaml
@@ -0,0 +1,46 @@ 
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/perf/xlnx-flexnoc-pm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Xilinx flexnoc Performance Monitor device tree bindings
+
+maintainers:
+  - Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
+
+properties:
+  compatible:
+    # Versal SoC based boards
+    items:
+      - enum:
+          - xlnx,flexnoc-pm-2.7
+
+  reg:
+    items:
+      - description: funnel registers
+      - description: baselpd registers
+      - description: basefpd registers
+
+  reg-names:
+    # The core schema enforces this is a string array
+    items:
+      - const: funnel
+      - const: baselpd
+      - const: basefpd
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    performance-monitor@f0920000 {
+        compatible = "xlnx,flexnoc-pm-2.7";
+        reg-names = "funnel", "baselpd", "basefpd";
+        reg = <0x0 0xf0920000 0x0 0x1000>,
+              <0x0 0xf0980000 0x0 0x9000>,
+              <0x0 0xf0b80000 0x0 0x9000>;
+    };