tests: drivers: build_all: sensor: add I3C test framework
Add framework to test sensor drivers I3C conditional checkings. Signed-off-by: Armando Visconti <armando.visconti@st.com>
This commit is contained in:
parent
0d9654670f
commit
0973531c94
4 changed files with 31 additions and 0 deletions
|
@ -143,6 +143,17 @@
|
||||||
|
|
||||||
#include "w1.dtsi"
|
#include "w1.dtsi"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
test_i3c: i3c@f0cacc1a {
|
||||||
|
#address-cells = <3>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
compatible = "vnd,i3c";
|
||||||
|
reg = <0xf0cacc1a 0x1000>;
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
#include "i3c.dtsi"
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
18
tests/drivers/build_all/sensor/i3c.dtsi
Normal file
18
tests/drivers/build_all/sensor/i3c.dtsi
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 STMicroelectronics
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Application overlay for i3c devices
|
||||||
|
*/
|
||||||
|
|
||||||
|
/****************************************
|
||||||
|
* PLEASE KEEP REG ADDRESSES SEQUENTIAL *
|
||||||
|
***************************************/
|
||||||
|
|
||||||
|
test_i3c_lps22hh: lps22hh@100000803E0000001 {
|
||||||
|
compatible = "st,lps22hh";
|
||||||
|
reg = <0x1 0x00000803 0xE0000001>;
|
||||||
|
assigned-address = <0x1>;
|
||||||
|
drdy-gpios = <&test_gpio 0 0>;
|
||||||
|
};
|
|
@ -6,6 +6,7 @@ CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
|
||||||
CONFIG_ADC=y
|
CONFIG_ADC=y
|
||||||
CONFIG_GPIO=y
|
CONFIG_GPIO=y
|
||||||
CONFIG_I2C=y
|
CONFIG_I2C=y
|
||||||
|
CONFIG_I3C=y
|
||||||
CONFIG_SERIAL=y
|
CONFIG_SERIAL=y
|
||||||
CONFIG_SPI=y
|
CONFIG_SPI=y
|
||||||
CONFIG_W1=y
|
CONFIG_W1=y
|
||||||
|
|
|
@ -282,6 +282,7 @@ static void run_generic_test(const struct device *dev)
|
||||||
|
|
||||||
/* Iterate through each of the emulated buses and create a test for each device. */
|
/* Iterate through each of the emulated buses and create a test for each device. */
|
||||||
DT_FOREACH_CHILD_STATUS_OKAY(DT_NODELABEL(test_i2c), DECLARE_ZTEST_PER_DEVICE)
|
DT_FOREACH_CHILD_STATUS_OKAY(DT_NODELABEL(test_i2c), DECLARE_ZTEST_PER_DEVICE)
|
||||||
|
DT_FOREACH_CHILD_STATUS_OKAY(DT_NODELABEL(test_i3c), DECLARE_ZTEST_PER_DEVICE)
|
||||||
DT_FOREACH_CHILD_STATUS_OKAY(DT_NODELABEL(test_spi), DECLARE_ZTEST_PER_DEVICE)
|
DT_FOREACH_CHILD_STATUS_OKAY(DT_NODELABEL(test_spi), DECLARE_ZTEST_PER_DEVICE)
|
||||||
|
|
||||||
ZTEST_SUITE(generic, NULL, NULL, before, NULL, NULL);
|
ZTEST_SUITE(generic, NULL, NULL, before, NULL, NULL);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue