From 3d2b18a5ff2a72a4d33b2f0fd2f9176e726b945d Mon Sep 17 00:00:00 2001 From: TOKITA Hiroshi Date: Tue, 17 Sep 2024 08:50:14 +0900 Subject: [PATCH] tests: drivers: build_all: counter: Add i2c-devices build tests Add build tests for following devices. - maxim,ds3231 - microchip,mcp7940n Signed-off-by: TOKITA Hiroshi --- .../build_all/counter/i2c_devices.overlay | 40 +++++++++++++++++++ tests/drivers/build_all/counter/testcase.yaml | 9 +++++ 2 files changed, 49 insertions(+) create mode 100644 tests/drivers/build_all/counter/i2c_devices.overlay diff --git a/tests/drivers/build_all/counter/i2c_devices.overlay b/tests/drivers/build_all/counter/i2c_devices.overlay new file mode 100644 index 00000000000..464c5573eb5 --- /dev/null +++ b/tests/drivers/build_all/counter/i2c_devices.overlay @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2024 TOKITA Hiroshi + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + test { + #address-cells = <1>; + #size-cells = <1>; + + test_gpio: gpio@deadbeef { + compatible = "vnd,gpio"; + gpio-controller; + reg = <0xdeadbeef 0x1000>; + #gpio-cells = <0x2>; + status = "okay"; + }; + + test_i2c: i2c@11112222 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "vnd,i2c"; + reg = <0x11112222 0x1000>; + status = "okay"; + clock-frequency = <100000>; + + test_ds3231: ds3231@0 { + compatible = "maxim,ds3231"; + status = "okay"; + reg = <0x0>; + }; + + test_mcp7940n: mcp7940n@1 { + compatible = "microchip,mcp7940n"; + status = "okay"; + reg = <0x1>; + }; + }; + }; +}; diff --git a/tests/drivers/build_all/counter/testcase.yaml b/tests/drivers/build_all/counter/testcase.yaml index d5861c45eae..662e0d0dba6 100644 --- a/tests/drivers/build_all/counter/testcase.yaml +++ b/tests/drivers/build_all/counter/testcase.yaml @@ -8,3 +8,12 @@ tests: platform_allow: arty_a7/designstart_fpga_cortex_m1 extra_configs: - CONFIG_COUNTER_XLNX_AXI_TIMER=y + drivers.counter.build.i2c: + extra_args: DTC_OVERLAY_FILE="i2c_devices.overlay" + extra_configs: + - CONFIG_I2C=y + platform_allow: + - native_posix + - native_posix/native/64 + - native_sim + - native_sim/native/64