Skip to content

Commit

Permalink
tests: drivers: build_all: gpio: Testing plural compatible handling case
Browse files Browse the repository at this point in the history
Add device definitions in dt to test drivers that handle
multiple "compatible"s by a single driver.

Signed-off-by: TOKITA Hiroshi <[email protected]>
  • Loading branch information
soburi committed Dec 7, 2024
1 parent 6aff65a commit 31e4ce5
Showing 1 changed file with 73 additions and 2 deletions.
75 changes: 73 additions & 2 deletions tests/drivers/build_all/gpio/app.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,56 @@
reset-gpios = <&test_gpio 0 0>;
};
};

test_i2c_mcp23008: mcp23008@17 {
compatible = "microchip,mcp23008";
reg = <0x17>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <16>;
};

test_i2c_mcp23009: mcp23009@18 {
compatible = "microchip,mcp23009";
reg = <0x18>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <16>;
};

test_i2c_mcp23016: mcp23016@19 {
compatible = "microchip,mcp23016";
reg = <0x19>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <16>;
};

test_i2c_mcp23018: mcp23016@1a {
compatible = "microchip,mcp23018";
reg = <0x1a>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <16>;
};

test_i2c_pca9554: pca9554@1b {
compatible = "nxp,pca9554";
reg = <0x1b>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <8>;
int-gpios = <&test_gpio 0 0>;
};

test_i2c_pca9555: pca9555@1c {
compatible = "nxp,pca9555";
reg = <0x1c>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <16>;
int-gpios = <&test_gpio 0 0>;
};
};

nct3807_alert_1 {
Expand All @@ -434,6 +484,8 @@
&test_gpio 0 0
&test_gpio 0 0
&test_gpio 0 0
&test_gpio 0 0
&test_gpio 0 0
&test_gpio 0 0>;

test_spi_mcp23s17: mcp23s17@0 {
Expand All @@ -445,8 +497,8 @@
ngpios = <16>;
};

test_spi_mcp23sxx: mcp23sxx@1 {
compatible = "microchip,mcp23sxx";
test_spi_mcp23sxx: mcp23s18@1 {
compatible = "microchip,mcp23s18";
spi-max-frequency = <0>;
reg = <0x01>;
gpio-controller;
Expand Down Expand Up @@ -553,6 +605,25 @@
sync-gpios = <&test_gpio 0 0>;
en-gpios = <&test_gpio 0 0>;
};

test_spi_mcp23s08: mcp23s08@8 {
compatible = "microchip,mcp23s08";
spi-max-frequency = <0>;
reg = <0x08>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <16>;
};

test_spi_mcp23s09: mcp23s09@9 {
compatible = "microchip,mcp23s09";
spi-max-frequency = <0>;
reg = <0x09>;
gpio-controller;
#gpio-cells = <2>;
ngpios = <16>;
};

};
};
};

0 comments on commit 31e4ce5

Please sign in to comment.