diff mbox series

[15/17,v1] ARM: ixp4xx: Add DT bindings

Message ID 20190203214205.13594-16-linus.walleij@linaro.org
State Superseded
Headers show
Series None | expand

Commit Message

Linus Walleij Feb. 3, 2019, 9:42 p.m. UTC
This adds initial device tree bindings for the IXP4xx machines.
This time I tried something wild and crazy and try to make proper
JSON-style YAML bindings for the top level.

Cc: devicetree@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

---
I have no clear idea on how to auto-test this schema for validity,
since it is a bit of a new thing I hope to figure it out as
we go.
---
 .../devicetree/bindings/arm/intel-ixp4xx.yaml | 22 +++++++++++++++++++
 MAINTAINERS                                   |  1 +
 2 files changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/intel-ixp4xx.yaml

-- 
2.20.1

Comments

Rob Herring (Arm) Feb. 4, 2019, 3:16 p.m. UTC | #1
On Sun, Feb 3, 2019 at 3:42 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>

> This adds initial device tree bindings for the IXP4xx machines.

> This time I tried something wild and crazy and try to make proper

> JSON-style YAML bindings for the top level.

>

> Cc: devicetree@vger.kernel.org

> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> ---

> I have no clear idea on how to auto-test this schema for validity,

> since it is a bit of a new thing I hope to figure it out as

> we go.


Is Documentation/devicetree/writing-schema.md missing something on how to?

The DT patchwork instance will have test results too, but in this case
it couldn't apply the patch since MAINTAINERS has a dependency...

> ---

>  .../devicetree/bindings/arm/intel-ixp4xx.yaml | 22 +++++++++++++++++++

>  MAINTAINERS                                   |  1 +

>  2 files changed, 23 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/arm/intel-ixp4xx.yaml


In any case, the manual checker thinks this looks fine.

Reviewed-by: Rob Herring <robh@kernel.org>
Linus Walleij Feb. 8, 2019, 7:37 p.m. UTC | #2
On Mon, Feb 4, 2019 at 4:16 PM Rob Herring <robh@kernel.org> wrote:
> On Sun, Feb 3, 2019 at 3:42 PM Linus Walleij <linus.walleij@linaro.org> wrote:

> >

> > This adds initial device tree bindings for the IXP4xx machines.

> > This time I tried something wild and crazy and try to make proper

> > JSON-style YAML bindings for the top level.

> >

> > Cc: devicetree@vger.kernel.org

> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

> > ---

> > I have no clear idea on how to auto-test this schema for validity,

> > since it is a bit of a new thing I hope to figure it out as

> > we go.

>

> Is Documentation/devicetree/writing-schema.md missing something on how to?


Yay! Now I finally got around to testing this, and it really works smooth!

I already had it help me find issues with my device trees and all.
This is really paying off from day one, a bit of threshold but it
delivers.

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/arm/intel-ixp4xx.yaml b/Documentation/devicetree/bindings/arm/intel-ixp4xx.yaml
new file mode 100644
index 000000000000..da5f6ffe6f2d
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/intel-ixp4xx.yaml
@@ -0,0 +1,22 @@ 
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/intel-ixp4xx.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intel IXP4xx Device Tree Bindings
+
+maintainers:
+  - Linus Walleij <linus.walleij@linaro.org>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - linksys,nslu2
+          - const: intel,ixp42x
+      - items:
+          - enum:
+              - gateworks,gw2358-4
+          - const: intel,ixp43x
diff --git a/MAINTAINERS b/MAINTAINERS
index 57d098b85523..c4ca249a2075 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1650,6 +1650,7 @@  M:	Imre Kaloz <kaloz@openwrt.org>
 M:	Krzysztof Halasa <khalasa@piap.pl>
 L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 S:	Maintained
+F:	Documentation/devicetree/bindings/arm/intel-ixp4xx.yaml
 F:	Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt
 F:	Documentation/devicetree/bindings/interrupt-controller/intel,ixp4xx-interrupt.txt
 F:	Documentation/devicetree/bindings/timer/intel,ixp4xx-timer.txt