Skip to contentSkip to conversation

Staging: silabs si4455 serial driver: docs device tree binding

PATCH In review József Horváth 2 participants 3 messages Dec 10, 2020 – Dec 11, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 Staging: silabs si4455 serial driver: docs device tree binding

add: device tree binding schema

---
 .../bindings/serial/silabs,si4455.yaml        | 53 +++++++++++++++++++
 MAINTAINERS                                   |  2 +-
 2 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/serial/silabs,si4455.yaml
Documentation/devicetree/bindings/serial/silabs,si4455.yaml new file +53 -0
new file mode 100644
index 000000000000..80a73a61755b
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/serial/silabs,si4455.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Silicon Labs Si4455 device tree bindings
+
+maintainers:
+  - József Horváth <[email protected]>
+
+allOf:
+  - $ref: "/schemas/serial.yaml#"
+
+properties:
+  compatible:
+    const: silabs,si4455
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  spi-max-frequency:
+    description: maximum clock frequency on SPI port
+    maximum: 500000
+
+  shutdown-gpios:
+    description: gpio pin for SDN
+    maxItems: 1
+
+required:
+  - reg
+  - interrupts
+  - spi-max-frequency
+  - shutdown-gpios
+
+additionalProperties: false
+
+examples:
+  - |
+    &spi0 {
+      serial0: si4455@0 {
+        compatible = "silabs,si4455";
+        reg = <0>;
+        interrupt-parent = <&gpio>;
+        interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+        shutdown-gpios = <&gpio 26 1>;
+        spi-max-frequency = <300000>;
+      };
+    };
+...
MAINTAINERS +1 -1
index a29bc17d446d..16cc96971ac2 100644
@@ -15937,7 +15937,7 @@ F:	drivers/platform/x86/touchscreen_dmi.c
 SILICON LABS SI4455 SERIAL DRIVER
 M:	József Horváth <[email protected]>
 S:	Maintained
-F:	Documentation/devicetree/bindings/staging/serial/silabs,si4455.txt
+F:	Documentation/devicetree/bindings/serial/silabs,si4455.yaml
 F:	drivers/tty/serial/si4455.c
 F:	drivers/tty/serial/si4455_api.h
 
Signature · 1 line
2.17.1
maintainer
#1 lore raw
Quoted 1 line · József Horváth

add: device tree binding schema

For the subject, follow conventions of the directory. Something like:

dt-bindings: serial: Add SiLabs SI4455 schema

Quoted 13 lines
---
 .../bindings/serial/silabs,si4455.yaml        | 53 +++++++++++++++++++
 MAINTAINERS                                   |  2 +-
 2 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/serial/silabs,si4455.yaml
Documentation/devicetree/bindings/serial/silabs,si4455.yaml new file +0 -0
new file mode 100644
index 000000000000..80a73a61755b

Documentation/devicetree/bindings/serial/silabs,si4455.yaml line 7

Quoted 7 lines
Documentation/devicetree/bindings/serial/silabs,si4455.yaml new file +7 -0
@@ -0,0 +1,53 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/serial/silabs,si4455.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Silicon Labs Si4455 device tree bindings

Add 'description' with some info on this h/w and possibly a link to datasheet if available.

Quoted 51 lines
Documentation/devicetree/bindings/serial/silabs,si4455.yaml new file +46 -0
+
+maintainers:
+  - József Horváth <[email protected]>
+
+allOf:
+  - $ref: "/schemas/serial.yaml#"
+
+properties:
+  compatible:
+    const: silabs,si4455
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  spi-max-frequency:
+    description: maximum clock frequency on SPI port
+    maximum: 500000
+
+  shutdown-gpios:
+    description: gpio pin for SDN
+    maxItems: 1
+
+required:
+  - reg
+  - interrupts
+  - spi-max-frequency
+  - shutdown-gpios
+
+additionalProperties: false
+
+examples:
+  - |
+    &spi0 {
+      serial0: si4455@0 {
+        compatible = "silabs,si4455";
+        reg = <0>;
+        interrupt-parent = <&gpio>;
+        interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
+        shutdown-gpios = <&gpio 26 1>;
+        spi-max-frequency = <300000>;
+      };
+    };
+...
MAINTAINERS +0 -0
index a29bc17d446d..16cc96971ac2 100644

MAINTAINERS F: drivers/platform/x86/touchscreen_dmi.c · line 15940

Quoted 4 lines
MAINTAINERS +0 -1
@@ -15937,7 +15937,7 @@ F:	drivers/platform/x86/touchscreen_dmi.c
 SILICON LABS SI4455 SERIAL DRIVER
 M:	József Horváth <[email protected]>
 S:	Maintained
-F:	Documentation/devicetree/bindings/staging/serial/silabs,si4455.txt

This is a new file, right?

Quoted 7 lines
MAINTAINERS +1 -0
+F:	Documentation/devicetree/bindings/serial/silabs,si4455.yaml
 F:	drivers/tty/serial/si4455.c
 F:	drivers/tty/serial/si4455_api.h
 
Signature · 1 line
2.17.1
maintainer
#2 lore raw
In reply to József Horváth
Quoted 9 lines · József Horváth

add: device tree binding schema

---
 .../bindings/serial/silabs,si4455.yaml        | 53 +++++++++++++++++++
 MAINTAINERS                                   |  2 +-
 2 files changed, 54 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/serial/silabs,si4455.yaml

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

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/serial/silabs,si4455.example.dts:19.9-14 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:342: Documentation/devicetree/bindings/serial/silabs,si4455.example.dt.yaml] Error 1 make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1364: dt_binding_check] Error 2

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

The base for the patch is generally the last rc1. Any dependencies should be noted.

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.