2023-07-22 10:27:27

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: i2c: nxp,pca9541: convert to DT schema

Convert the bindings for NXP PCA9541 I2C bus master selector to DT
schema.

Signed-off-by: Krzysztof Kozlowski <[email protected]>

---

Changes in v2:
1. New patch (Doug)
---
.../devicetree/bindings/i2c/nxp,pca9541.txt | 29 ----------
.../devicetree/bindings/i2c/nxp,pca9541.yaml | 56 +++++++++++++++++++
2 files changed, 56 insertions(+), 29 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/i2c/nxp,pca9541.txt
create mode 100644 Documentation/devicetree/bindings/i2c/nxp,pca9541.yaml

diff --git a/Documentation/devicetree/bindings/i2c/nxp,pca9541.txt b/Documentation/devicetree/bindings/i2c/nxp,pca9541.txt
deleted file mode 100644
index 42bfc09c8918..000000000000
--- a/Documentation/devicetree/bindings/i2c/nxp,pca9541.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-* NXP PCA9541 I2C bus master selector
-
-Required Properties:
-
- - compatible: Must be "nxp,pca9541"
-
- - reg: The I2C address of the device.
-
- The following required properties are defined externally:
-
- - I2C arbitration bus node. See i2c-arb.txt in this directory.
-
-
-Example:
-
- i2c-arbitrator@74 {
- compatible = "nxp,pca9541";
- reg = <0x74>;
-
- i2c-arb {
- #address-cells = <1>;
- #size-cells = <0>;
-
- eeprom@54 {
- compatible = "atmel,24c08";
- reg = <0x54>;
- };
- };
- };
diff --git a/Documentation/devicetree/bindings/i2c/nxp,pca9541.yaml b/Documentation/devicetree/bindings/i2c/nxp,pca9541.yaml
new file mode 100644
index 000000000000..b65c25c1a435
--- /dev/null
+++ b/Documentation/devicetree/bindings/i2c/nxp,pca9541.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i2c/nxp,pca9541.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP PCA9541 I2C bus master selector
+
+maintainers:
+ - Peter Rosin <[email protected]>
+
+properties:
+ compatible:
+ const: nxp,pca9541
+
+ reg:
+ maxItems: 1
+
+ i2c-arb:
+ type: object
+ $ref: /schemas/i2c/i2c-controller.yaml
+ unevaluatedProperties: false
+ description:
+ I2C arbitration bus node.
+
+required:
+ - compatible
+ - reg
+ - i2c-arb
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ i2c-arbitrator@74 {
+ compatible = "nxp,pca9541";
+ reg = <0x74>;
+
+ i2c-arb {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ eeprom@54 {
+ compatible = "atmel,24c08";
+ reg = <0x54>;
+ };
+ };
+ };
+ };
--
2.34.1



2023-07-22 11:20:18

by Peter Rosin

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: i2c: nxp,pca9541: convert to DT schema

Hi!

2023-07-22 at 11:57, Krzysztof Kozlowski wrote:
> Convert the bindings for NXP PCA9541 I2C bus master selector to DT
> schema.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Thanks for doing this conversion!

Acked-by: Peter Rosin <[email protected]>

>
> ---
>
> Changes in v2:
> 1. New patch (Doug)
> ---
> .../devicetree/bindings/i2c/nxp,pca9541.txt | 29 ----------
> .../devicetree/bindings/i2c/nxp,pca9541.yaml | 56 +++++++++++++++++++
> 2 files changed, 56 insertions(+), 29 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/i2c/nxp,pca9541.txt
> create mode 100644 Documentation/devicetree/bindings/i2c/nxp,pca9541.yaml
>
> diff --git a/Documentation/devicetree/bindings/i2c/nxp,pca9541.txt b/Documentation/devicetree/bindings/i2c/nxp,pca9541.txt
> deleted file mode 100644
> index 42bfc09c8918..000000000000
> --- a/Documentation/devicetree/bindings/i2c/nxp,pca9541.txt
> +++ /dev/null
> @@ -1,29 +0,0 @@
> -* NXP PCA9541 I2C bus master selector
> -
> -Required Properties:
> -
> - - compatible: Must be "nxp,pca9541"
> -
> - - reg: The I2C address of the device.
> -
> - The following required properties are defined externally:
> -
> - - I2C arbitration bus node. See i2c-arb.txt in this directory.
> -
> -
> -Example:
> -
> - i2c-arbitrator@74 {
> - compatible = "nxp,pca9541";
> - reg = <0x74>;
> -
> - i2c-arb {
> - #address-cells = <1>;
> - #size-cells = <0>;
> -
> - eeprom@54 {
> - compatible = "atmel,24c08";
> - reg = <0x54>;
> - };
> - };
> - };
> diff --git a/Documentation/devicetree/bindings/i2c/nxp,pca9541.yaml b/Documentation/devicetree/bindings/i2c/nxp,pca9541.yaml
> new file mode 100644
> index 000000000000..b65c25c1a435
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/i2c/nxp,pca9541.yaml
> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/i2c/nxp,pca9541.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: NXP PCA9541 I2C bus master selector
> +
> +maintainers:
> + - Peter Rosin <[email protected]>
> +
> +properties:
> + compatible:
> + const: nxp,pca9541
> +
> + reg:
> + maxItems: 1
> +
> + i2c-arb:
> + type: object
> + $ref: /schemas/i2c/i2c-controller.yaml
> + unevaluatedProperties: false
> + description:
> + I2C arbitration bus node.
> +
> +required:
> + - compatible
> + - reg
> + - i2c-arb
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + i2c-arbitrator@74 {
> + compatible = "nxp,pca9541";
> + reg = <0x74>;
> +
> + i2c-arb {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + eeprom@54 {
> + compatible = "atmel,24c08";
> + reg = <0x54>;
> + };
> + };
> + };
> + };

2023-07-22 12:32:42

by Conor Dooley

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: i2c: nxp,pca9541: convert to DT schema

On Sat, Jul 22, 2023 at 11:57:09AM +0200, Krzysztof Kozlowski wrote:
> Convert the bindings for NXP PCA9541 I2C bus master selector to DT
> schema.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Reviewed-by: Conor Dooley <[email protected]>

Thanks,
Conor.


Attachments:
(No filename) (303.00 B)
signature.asc (235.00 B)
Download all attachments

2023-07-23 20:27:44

by Andi Shyti

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: i2c: nxp,pca9541: convert to DT schema

Hi Krzysztof,

On Sat, Jul 22, 2023 at 11:57:09AM +0200, Krzysztof Kozlowski wrote:
> Convert the bindings for NXP PCA9541 I2C bus master selector to DT
> schema.
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Acked-by: Andi Shyti <[email protected]>

Andi