tests: drivers: build_all: audio: Add i2c-devices to build test

Add build tests for the following devices.

- ti,tas6422dac
- ti,tlv320dac

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This commit is contained in:
TOKITA Hiroshi 2024-09-27 18:47:09 +09:00 committed by Benjamin Cabé
commit 0bc0dd7767
5 changed files with 76 additions and 0 deletions

View file

@ -0,0 +1,8 @@
# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(build_all_misc)
FILE(GLOB app_sources src/*.c)
target_sources(app PRIVATE ${app_sources})

View file

@ -0,0 +1,41 @@
/*
* 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_i2c_tas6422dac: tas6422dac@0 {
compatible = "ti,tas6422dac";
status = "okay";
reg = <0x0>;
};
test_i2c_tlv320dac: tlv320dac@1 {
compatible = "ti,tlv320dac";
status = "okay";
reg = <0x1>;
reset-gpios = <&test_gpio 0 0>;
};
};
};
};

View file

@ -0,0 +1,4 @@
CONFIG_TEST=y
CONFIG_GPIO=y
CONFIG_AUDIO=y
CONFIG_AUDIO_CODEC=y

View file

@ -0,0 +1,10 @@
/*
* Copyright (c) 2024 TOKITA Hiroshi
*
* SPDX-License-Identifier: Apache-2.0
*/
int main(void)
{
return 0;
}

View file

@ -0,0 +1,13 @@
common:
build_only: true
tags:
- drivers
- audio
tests:
drivers.audio.build.i2c:
extra_args: DTC_OVERLAY_FILE="i2c_devices.overlay"
extra_configs:
- CONFIG_I2C=y
platform_allow:
- native_sim
- native_sim/native/64