Skip to contentSkip to conversation

dt-bindings: misc: add YAML binding for qemu,pvpanic-mmio

PATCH In review Rohan Mithari 4 participants 4 messages May 20 – May 21 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: misc: add YAML binding for qemu,pvpanic-mmio

---
 .../bindings/misc/qemu,pvpanic-mmio.yaml      | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/qemu,pvpanic-mmio.yaml
Documentation/devicetree/bindings/misc/qemu,pvpanic-mmio.yaml new file +33 -0
new file mode 100644
index 000000000000..22d1333f9c2d
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/misc/qemu,pvpanic-mmio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: QEMU PVPANIC MMIO device
+
+description:
+  QEMU provides a pvpanic MMIO interface for guest panic notification.
+
+maintainers:
+  - Peng Hao <[email protected]>
+
+properties:
+  compatible:
+    const: qemu,pvpanic-mmio
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    pvpanic@9060000 {
+      compatible = "qemu,pvpanic-mmio";
+      reg = <0x0 0x9060000 0x0 0x2>;
+    };
\ No newline at end of file
Signature · 1 line
2.34.1
#1 lore raw
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider: - [Medium] The commit introduces a YAML version of the qemu,pvpanic-mmio binding without deleting the…

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] The commit introduces a YAML version of the qemu,pvpanic-mmio binding without deleting the original text binding.
- [Low] The example uses a 4-cell reg property without specifying #address-cells and #size-cells, which will cause dt_binding_check to fail.
- [Low] Missing newline at the end of the YAML file.
--

commit 8822d211de2348fd88169fd34a07c2dd995de355
Author: Rohan Mithari <[email protected]>

dt-bindings: misc: add YAML binding for qemu,pvpanic-mmio

This commit adds a new YAML device tree binding schema for the QEMU PVPANIC MMIO device.

Documentation/devicetree/bindings/misc/qemu,pvpanic-mmio.yaml

Quoted 5 lines
Documentation/devicetree/bindings/misc/qemu,pvpanic-mmio.yaml new file +0 -0
new file mode 100644
index 0000000000000..22d1333f9c2df

[Severity: Medium]
Does this patch omit the deletion of the original pvpanic-mmio.txt file?

When converting an older text device tree binding to the YAML format, the original text file should typically be removed in the same commit to prevent duplicated documentation and out-of-sync updates.

[ ... ]

Documentation/devicetree/bindings/misc/qemu,pvpanic-mmio.yaml line 32

Quoted 5 lines
Documentation/devicetree/bindings/misc/qemu,pvpanic-mmio.yaml new file +5 -0
+examples:
+  - |
+    pvpanic@9060000 {
+      compatible = "qemu,pvpanic-mmio";
+      reg = <0x0 0x9060000 0x0 0x2>;

[Severity: Low]
Will this example trigger a schema validation error during make dt_binding_check?

In the dt-schema testing framework, example snippets are implicitly wrapped in a root node where the default address-cells and size-cells are 1. The reg property here provides 4 cells, which parses as an array of 2 distinct items. However, the schema restricts the reg property with a maxItems: 1 constraint.

Could the example be updated to specify the correct address-cells and size-cells to match the 4-cell reg property?

Quoted 2 lines

+ };
\ No newline at end of file

[Severity: Low]
This isn't a bug, but there is a missing trailing newline character at the end of the file.

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#2 lore raw
In reply to Rohan Mithari
Quoted 6 lines · Rohan Mithari
---
 .../bindings/misc/qemu,pvpanic-mmio.yaml      | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/qemu,pvpanic-mmio.yaml

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

yamllint warnings/errors:
./Documentation/devicetree/bindings/misc/qemu,pvpanic-mmio.yaml:33:7: [error] no new line character at the end of file (new-line-at-end-of-file)

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/misc/qemu,pvpanic-mmio.example.dtb: pvpanic@9060000 (qemu,pvpanic-mmio): reg: [[0, 151388160], [0, 2]] is too long
from schema $id: http://devicetree.org/schemas/misc/qemu,pvpanic-mmio.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.kernel.org/project/devicetree/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

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 after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.