mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-26 14:17:26 -04:00
of: convert unittest overlay devicetree source to sugar syntax
The unittest-data overlays have been pulled into proper overlay devicetree source files without changing their format. The next step is to convert them to use sugar syntax instead of hand coding overlay fragments structure. A few of the overlays can not be converted because they test absolute target paths in the overlay fragment. dtc does not generate this type of target: overlay_0.dts overlay_1.dts overlay_12.dts overlay_13.dts Two pre-existing unittest overlay devicetree source files are also converted: overlay_bad_phandle.dts overlay_bad_symbol.dts Signed-off-by: Frank Rowand <frank.rowand@sony.com>
This commit is contained in:
parent
93a6039000
commit
db2f3762d6
15 changed files with 159 additions and 244 deletions
|
@ -2,12 +2,8 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/ {
|
&electric_1 {
|
||||||
|
|
||||||
fragment@0 {
|
|
||||||
target = <&electric_1>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
hvac_2: hvac-large-1 {
|
hvac_2: hvac-large-1 {
|
||||||
|
@ -16,12 +12,9 @@
|
||||||
cool-range = < 65 80 >;
|
cool-range = < 65 80 >;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
fragment@1 {
|
&rides_1 {
|
||||||
target = <&rides_1>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
@ -62,16 +55,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
fragment@2 {
|
&lights_2 {
|
||||||
target = <&lights_2>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
color = "purple", "white", "red", "green";
|
color = "purple", "white", "red", "green";
|
||||||
rate = < 3 256 >;
|
rate = < 3 256 >;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
|
@ -2,14 +2,10 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/ {
|
|
||||||
/* overlay_10 */
|
/* overlay_10 */
|
||||||
/* overlays 8, 9, 10, 11 application and removal in bad sequence */
|
/* overlays 8, 9, 10, 11 application and removal in bad sequence */
|
||||||
|
|
||||||
fragment@0 {
|
&unittest_test_bus {
|
||||||
target-path = "/testcase-data/overlay-node/test-bus";
|
|
||||||
__overlay__ {
|
|
||||||
|
|
||||||
/* suppress DTC warning */
|
/* suppress DTC warning */
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
@ -27,8 +23,5 @@
|
||||||
status = "okay";
|
status = "okay";
|
||||||
reg = <1>;
|
reg = <1>;
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,14 +2,10 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/ {
|
|
||||||
/* overlay_11 */
|
/* overlay_11 */
|
||||||
/* overlays 8, 9, 10, 11 application and removal in bad sequence */
|
/* overlays 8, 9, 10, 11 application and removal in bad sequence */
|
||||||
|
|
||||||
fragment@0 {
|
&unittest_test_bus {
|
||||||
target-path = "/testcase-data/overlay-node/test-bus";
|
|
||||||
__overlay__ {
|
|
||||||
|
|
||||||
/* suppress DTC warning */
|
/* suppress DTC warning */
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
@ -30,5 +26,3 @@
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
|
@ -2,12 +2,9 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/ {
|
|
||||||
/* overlay_15 - mux overlay */
|
/* overlay_15 - mux overlay */
|
||||||
|
|
||||||
fragment@0 {
|
&unittest_i2c_test_bus {
|
||||||
target-path = "/testcase-data/overlay-node/test-bus/i2c-test-bus";
|
|
||||||
__overlay__ {
|
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
test-unittest15 {
|
test-unittest15 {
|
||||||
|
@ -31,5 +28,3 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
|
@ -2,13 +2,8 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/ {
|
|
||||||
/* overlay_2 - enable using label */
|
/* overlay_2 - enable using label */
|
||||||
|
|
||||||
fragment@0 {
|
&unittest2 {
|
||||||
target = <&unittest2>;
|
|
||||||
__overlay__ {
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
|
@ -2,13 +2,8 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/ {
|
|
||||||
/* overlay_3 - disable using label */
|
/* overlay_3 - disable using label */
|
||||||
|
|
||||||
fragment@0 {
|
&unittest3 {
|
||||||
target = <&unittest3>;
|
|
||||||
__overlay__ {
|
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
|
@ -2,12 +2,9 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/ {
|
|
||||||
/* overlay_4 - test insertion of a full node */
|
/* overlay_4 - test insertion of a full node */
|
||||||
|
|
||||||
fragment@0 {
|
&unittest_test_bus {
|
||||||
target = <&unittestbus>;
|
|
||||||
__overlay__ {
|
|
||||||
|
|
||||||
/* suppress DTC warning */
|
/* suppress DTC warning */
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -19,5 +16,3 @@
|
||||||
reg = <4>;
|
reg = <4>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
|
@ -2,13 +2,8 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/ {
|
|
||||||
/* overlay_5 - test overlay apply revert */
|
/* overlay_5 - test overlay apply revert */
|
||||||
|
|
||||||
fragment@0 {
|
&unittest5 {
|
||||||
target-path = "/testcase-data/overlay-node/test-bus/test-unittest5";
|
|
||||||
__overlay__ {
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
|
@ -2,14 +2,9 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/ {
|
|
||||||
/* overlay_6 */
|
/* overlay_6 */
|
||||||
/* overlays 6, 7 application and removal in sequence */
|
/* overlays 6, 7 application and removal in sequence */
|
||||||
|
|
||||||
fragment@0 {
|
&unittest6 {
|
||||||
target-path = "/testcase-data/overlay-node/test-bus/test-unittest6";
|
|
||||||
__overlay__ {
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
|
@ -2,14 +2,9 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/ {
|
|
||||||
/* overlay_7 */
|
/* overlay_7 */
|
||||||
/* overlays 6, 7 application and removal in sequence */
|
/* overlays 6, 7 application and removal in sequence */
|
||||||
|
|
||||||
fragment@0 {
|
&unittest7 {
|
||||||
target-path = "/testcase-data/overlay-node/test-bus/test-unittest7";
|
|
||||||
__overlay__ {
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
|
@ -2,14 +2,9 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/ {
|
|
||||||
/* overlay_8 */
|
/* overlay_8 */
|
||||||
/* overlays 8, 9, 10, 11 application and removal in bad sequence */
|
/* overlays 8, 9, 10, 11 application and removal in bad sequence */
|
||||||
|
|
||||||
fragment@0 {
|
&unittest8 {
|
||||||
target-path = "/testcase-data/overlay-node/test-bus/test-unittest8";
|
|
||||||
__overlay__ {
|
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
|
@ -2,14 +2,9 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/ {
|
|
||||||
/* overlay_9 */
|
/* overlay_9 */
|
||||||
/* overlays 8, 9, 10, 11 application and removal in bad sequence */
|
/* overlays 8, 9, 10, 11 application and removal in bad sequence */
|
||||||
|
|
||||||
fragment@0 {
|
&unittest8 {
|
||||||
target-path = "/testcase-data/overlay-node/test-bus/test-unittest8";
|
|
||||||
__overlay__ {
|
|
||||||
property-foo = "bar";
|
property-foo = "bar";
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
|
@ -2,12 +2,7 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/ {
|
&electric_1 {
|
||||||
|
|
||||||
fragment@0 {
|
|
||||||
target = <&electric_1>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
|
|
||||||
// This label should cause an error when the overlay
|
// This label should cause an error when the overlay
|
||||||
// is applied. There is already a phandle value
|
// is applied. There is already a phandle value
|
||||||
|
@ -17,5 +12,3 @@
|
||||||
decelerate = < 5 >;
|
decelerate = < 5 >;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
|
@ -2,12 +2,7 @@
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
/plugin/;
|
/plugin/;
|
||||||
|
|
||||||
/ {
|
&electric_1 {
|
||||||
|
|
||||||
fragment@0 {
|
|
||||||
target = <&electric_1>;
|
|
||||||
|
|
||||||
__overlay__ {
|
|
||||||
|
|
||||||
// This label should cause an error when the overlay
|
// This label should cause an error when the overlay
|
||||||
// is applied. There is already a symbol hvac_1
|
// is applied. There is already a symbol hvac_1
|
||||||
|
@ -19,5 +14,3 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
overlay-node {
|
overlay-node {
|
||||||
|
|
||||||
/* test bus */
|
/* test bus */
|
||||||
unittestbus: test-bus {
|
unittest_test_bus: test-bus {
|
||||||
compatible = "simple-bus";
|
compatible = "simple-bus";
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
reg = <8>;
|
reg = <8>;
|
||||||
};
|
};
|
||||||
|
|
||||||
i2c-test-bus {
|
unittest_i2c_test_bus: i2c-test-bus {
|
||||||
compatible = "unittest-i2c-bus";
|
compatible = "unittest-i2c-bus";
|
||||||
status = "okay";
|
status = "okay";
|
||||||
reg = <50>;
|
reg = <50>;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue