Skip to content

Commit

Permalink
tests: drivers: build_all: add build test for ad559x i2c driver
Browse files Browse the repository at this point in the history
Add build-only test of the ad559x I2C based ADC, DAC and GPIO driver.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
  • Loading branch information
Jeppe Odgaard committed Mar 29, 2024
1 parent dd1c51c commit 70ad84c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 3 deletions.
15 changes: 14 additions & 1 deletion tests/drivers/build_all/adc/boards/native_sim.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,19 @@
conversion-speed = <60>;
#io-channel-cells = <1>;
};

test_i2c_ad559x: ad559x@9 {
compatible = "adi,ad559x";
status = "okay";
reg = <0x9>;
#io-channel-cells = <1>;
reset-gpios = <&test_gpio 0 0>;

test_i2c_ad559x_adc: adc-controller {
compatible = "adi,ad559x-adc";
#io-channel-cells = <1>;
};
};
};

test_spi: spi@33334444 {
Expand Down Expand Up @@ -322,7 +335,7 @@
spi-max-frequency = <0>;
reset-gpios = <&test_gpio 0 0>;

ad559x_adc: adc-controller {
test_spi_ad559x_adc: adc-controller {
compatible = "adi,ad559x-adc";
#io-channel-cells = <1>;
};
Expand Down
14 changes: 13 additions & 1 deletion tests/drivers/build_all/dac/app.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@
#io-channel-cells = <1>;
};

test_i2c_ad559x: ad559x@3 {
compatible = "adi,ad559x";
status = "okay";
reg = <0x3>;
reset-gpios = <&test_gpio 0 0>;

test_i2c_ad559x_dac: dac-controller {
compatible = "adi,ad559x-dac";
#io-channel-cells = <1>;
};
};

test_i2c_mcp4725: mcp4725@60 {
compatible = "microchip,mcp4725";
reg = <0x60>;
Expand Down Expand Up @@ -242,7 +254,7 @@
spi-max-frequency = <0>;
reset-gpios = <&test_gpio 0 0>;

ad559x_dac: dac-controller {
test_spi_ad559x_dac: dac-controller {
compatible = "adi,ad559x-dac";
#io-channel-cells = <1>;
};
Expand Down
16 changes: 15 additions & 1 deletion tests/drivers/build_all/gpio/app.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,20 @@
ngpios = <6>;
};
};

test_i2c_ad559x: ad559x@e {
compatible = "adi,ad559x";
status = "okay";
reg = <0x0e>;
reset-gpios = <&test_gpio 0 0>;

test_i2c_ad559x_gpio: gpio-controller {
compatible = "adi,ad559x-gpio";
gpio-controller;
#gpio-cells = <2>;
ngpios = <8>;
};
};
};

nct3807_alert_1 {
Expand Down Expand Up @@ -275,7 +289,7 @@
spi-max-frequency = <0>;
reset-gpios = <&test_gpio 0 0>;

ad559x_gpio: gpio-controller {
test_spi_ad559x_gpio: gpio-controller {
compatible = "adi,ad559x-gpio";
gpio-controller;
#gpio-cells = <2>;
Expand Down

0 comments on commit 70ad84c

Please sign in to comment.