From 998d7a01dda2c7c4ea23e0a6ea737d5d0921ce5c Mon Sep 17 00:00:00 2001 From: Jim Paris Date: Wed, 7 Aug 2019 15:21:12 -0400 Subject: [PATCH] scripts/dts: add basic test for IO channel property Test the new io-channel support Signed-off-by: Jim Paris --- scripts/dts/test-bindings/io-channel.yaml | 14 ++++++++++++++ scripts/dts/test.dts | 16 ++++++++++++++++ scripts/dts/testedtlib.py | 7 +++++++ 3 files changed, 37 insertions(+) create mode 100644 scripts/dts/test-bindings/io-channel.yaml diff --git a/scripts/dts/test-bindings/io-channel.yaml b/scripts/dts/test-bindings/io-channel.yaml new file mode 100644 index 00000000000..1077d6914d6 --- /dev/null +++ b/scripts/dts/test-bindings/io-channel.yaml @@ -0,0 +1,14 @@ +# +# SPDX-License-Identifier: BSD-3-Clause +# + +title: IO channel with one cell +description: IO channel with one cell + +properties: + compatible: + constraint: "io-channel" + type: string-array + +"#cells": + - one diff --git a/scripts/dts/test.dts b/scripts/dts/test.dts index 29b2353ed51..b3d4cd28665 100644 --- a/scripts/dts/test.dts +++ b/scripts/dts/test.dts @@ -195,6 +195,22 @@ }; }; + // + // IO channels + // + + // Lots of common code with PWMs and clocks, so just test the basics + io-channel-test { + io-channel { + compatible = "io-channel"; + #io-channel-cells = <1>; + }; + node { + io-channels = <&{/io-channel-test/io-channel} 1>; + io-channel-names = "io-channel"; + }; + }; + // // 'reg' // diff --git a/scripts/dts/testedtlib.py b/scripts/dts/testedtlib.py index e566a2ca004..4bc5677a498 100755 --- a/scripts/dts/testedtlib.py +++ b/scripts/dts/testedtlib.py @@ -72,6 +72,13 @@ def run(): verify_streq(edt.get_dev("/pwm-test/node").pwms, "[, specifier: {}>, , specifier: {'one': 1}>]") + # + # Test IO channels + # + + verify_streq(edt.get_dev("/io-channel-test/node").iochannels, + "[, specifier: {'one': 1}>]") + # # Test 'reg' #