diff mbox series

[v3,1/2] dt-bindings: i2c: nxp,pca9541: convert to DT schema

Message ID 20230731163833.319258-1-krzysztof.kozlowski@linaro.org
State Not Applicable, archived
Headers show
Series [v3,1/2] dt-bindings: i2c: nxp,pca9541: convert to DT schema | expand

Checks

Context Check Description
robh/checkpatch warning total: 0 errors, 2 warnings, 56 lines checked
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Krzysztof Kozlowski July 31, 2023, 4:38 p.m. UTC
Convert the bindings for NXP PCA9541 I2C bus master selector to DT
schema.

Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Acked-by: Peter Rosin <peda@axentia.se>
Acked-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

---

Changes in v3:
1. Add acks.

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

Comments

Andi Shyti Aug. 2, 2023, 8:10 p.m. UTC | #1
Hi

On Mon, 31 Jul 2023 18:38:32 +0200, Krzysztof Kozlowski wrote:
> Convert the bindings for NXP PCA9541 I2C bus master selector to DT
> schema.
> 
> 

Applied to i2c/andi-for-next on

https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git

Please note that this patch may still undergo further evaluation
and the final decision will be made in collaboration with
Wolfram.

Thank you,
Andi

Patches applied
===============
[1/2] dt-bindings: i2c: nxp,pca9541: convert to DT schema
      commit: 696a995b8f8b2611a37a11cffeb67de6d8757b29
[2/2] dt-bindings: i2c: arb-gpio-challange: convert to DT schema
      commit: 54b4b9b74530eec66a6dd2cba33abf0e65a17cec
Wolfram Sang Aug. 14, 2023, 3:12 p.m. UTC | #2
On Wed, Aug 02, 2023 at 10:10:33PM +0200, Andi Shyti wrote:
> Hi
> 
> On Mon, 31 Jul 2023 18:38:32 +0200, Krzysztof Kozlowski wrote:
> > Convert the bindings for NXP PCA9541 I2C bus master selector to DT
> > schema.
> > 
> > 
> 
> Applied to i2c/andi-for-next on

Applied to for-next (via Andi's branch), thanks!
diff mbox series

Patch

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 <peda@axentia.se>
+
+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>;
+                };
+            };
+        };
+    };