diff options
author | Stephen Boyd <stephen.boyd@linaro.org> | 2018-01-31 03:36:17 +0100 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2018-02-12 15:37:59 +0100 |
commit | 357aa4b61c82b59a40caf5a65d22e636a3639144 (patch) | |
tree | 8b59312f43affae1b97633a21bc96ac9a3dd1543 /drivers/of/unittest-data | |
parent | of: Support parsing phandle argument lists through a nexus node (diff) | |
download | linux-357aa4b61c82b59a40caf5a65d22e636a3639144.tar.xz linux-357aa4b61c82b59a40caf5a65d22e636a3639144.zip |
of: unittest: Add phandle remapping test
Test the functionality of of_parse_phandle_with_args_map().
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/unittest-data')
-rw-r--r-- | drivers/of/unittest-data/tests-phandle.dtsi | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/of/unittest-data/tests-phandle.dtsi b/drivers/of/unittest-data/tests-phandle.dtsi index 3c2f09e56b61..6b33be4c4416 100644 --- a/drivers/of/unittest-data/tests-phandle.dtsi +++ b/drivers/of/unittest-data/tests-phandle.dtsi @@ -26,6 +26,18 @@ #phandle-cells = <3>; }; + provider4: provider4 { + #phandle-cells = <2>; + phandle-map = <0 1 &provider1 3>, + <4 0 &provider0>, + <16 5 &provider3 3 5 0>, + <200 8 &provider2 23 6>, + <19 0 &provider2 15 0>, + <2 3 &provider3 2 5 3>; + phandle-map-mask = <0xff 0xf>; + phandle-map-pass-thru = <0x0 0xf0>; + }; + consumer-a { phandle-list = <&provider1 1>, <&provider2 2 0>, @@ -44,6 +56,19 @@ unterminated-string = [40 41 42 43]; unterminated-string-list = "first", "second", [40 41 42 43]; }; + + consumer-b { + phandle-list = <&provider1 1>, + <&provider4 2 3>, + <0>, + <&provider4 4 0x100>, + <&provider4 0 0x61>, + <&provider0>, + <&provider4 19 0x20>; + phandle-list-bad-phandle = <12345678 0 0>; + phandle-list-bad-args = <&provider2 1 0>, + <&provider4 0>; + }; }; }; }; |