diff options
author | Pantelis Antoniou <pantelis.antoniou@konsulko.com> | 2015-01-12 12:02:49 -0500 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2015-02-04 11:43:14 -0500 |
commit | d5e75500ca401d3128c82c5b0dee2f9b259d5b5c (patch) | |
tree | c4a7cf26e96b68c585b2a59222a1a79537ceab5e /Documentation/devicetree/bindings/unittest.txt | |
parent | 962a70d05edac2e2eb53cd077715930083964b9e (diff) |
of: unitest: Add I2C overlay unit tests.
Introduce I2C device tree overlay tests.
Tests insertion and removal of i2c adapters, i2c devices, and muxes.
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'Documentation/devicetree/bindings/unittest.txt')
-rw-r--r-- | Documentation/devicetree/bindings/unittest.txt | 59 |
1 files changed, 58 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/unittest.txt b/Documentation/devicetree/bindings/unittest.txt index 0f92a22fddfa..8933211f32f9 100644 --- a/Documentation/devicetree/bindings/unittest.txt +++ b/Documentation/devicetree/bindings/unittest.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | * OF selftest platform device | 1 | 1) OF selftest platform device |
2 | 2 | ||
3 | ** selftest | 3 | ** selftest |
4 | 4 | ||
@@ -12,3 +12,60 @@ Example: | |||
12 | compatible = "selftest"; | 12 | compatible = "selftest"; |
13 | status = "okay"; | 13 | status = "okay"; |
14 | }; | 14 | }; |
15 | |||
16 | 2) OF selftest i2c adapter platform device | ||
17 | |||
18 | ** platform device unittest adapter | ||
19 | |||
20 | Required properties: | ||
21 | - compatible: must be selftest-i2c-bus | ||
22 | |||
23 | Children nodes contain selftest i2c devices. | ||
24 | |||
25 | Example: | ||
26 | selftest-i2c-bus { | ||
27 | compatible = "selftest-i2c-bus"; | ||
28 | status = "okay"; | ||
29 | }; | ||
30 | |||
31 | 3) OF selftest i2c device | ||
32 | |||
33 | ** I2C selftest device | ||
34 | |||
35 | Required properties: | ||
36 | - compatible: must be selftest-i2c-dev | ||
37 | |||
38 | All other properties are optional | ||
39 | |||
40 | Example: | ||
41 | selftest-i2c-dev { | ||
42 | compatible = "selftest-i2c-dev"; | ||
43 | status = "okay"; | ||
44 | }; | ||
45 | |||
46 | 4) OF selftest i2c mux device | ||
47 | |||
48 | ** I2C selftest mux | ||
49 | |||
50 | Required properties: | ||
51 | - compatible: must be selftest-i2c-mux | ||
52 | |||
53 | Children nodes contain selftest i2c bus nodes per channel. | ||
54 | |||
55 | Example: | ||
56 | selftest-i2c-mux { | ||
57 | compatible = "selftest-i2c-mux"; | ||
58 | status = "okay"; | ||
59 | #address-cells = <1>; | ||
60 | #size-cells = <0>; | ||
61 | channel-0 { | ||
62 | reg = <0>; | ||
63 | #address-cells = <1>; | ||
64 | #size-cells = <0>; | ||
65 | i2c-dev { | ||
66 | reg = <8>; | ||
67 | compatible = "selftest-i2c-dev"; | ||
68 | status = "okay"; | ||
69 | }; | ||
70 | }; | ||
71 | }; | ||