tests: build_all: charger: Builds BQ24190 driver
Adds the BQ24190 driver to the build_all test. Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
This commit is contained in:
parent
2107c9109f
commit
e8e907b5a5
6 changed files with 69 additions and 0 deletions
8
tests/drivers/build_all/charger/CMakeLists.txt
Normal file
8
tests/drivers/build_all/charger/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Copyright (c) 2023 Cirrus Logic, Inc.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
cmake_minimum_required(VERSION 3.20.0)
|
||||||
|
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||||
|
project(build_all)
|
||||||
|
|
||||||
|
target_sources(app PRIVATE src/main.c)
|
24
tests/drivers/build_all/charger/app.overlay
Normal file
24
tests/drivers/build_all/charger/app.overlay
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Cirrus Logic, Inc.
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <zephyr/dt-bindings/i2c/i2c.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
test {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
|
test_i2c: i2c@11112222 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
compatible = "vnd,i2c";
|
||||||
|
reg = <0x11112222 0x1000>;
|
||||||
|
status = "okay";
|
||||||
|
clock-frequency = <I2C_BITRATE_STANDARD>;
|
||||||
|
|
||||||
|
#include "i2c.dtsi"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
17
tests/drivers/build_all/charger/i2c.dtsi
Normal file
17
tests/drivers/build_all/charger/i2c.dtsi
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Cirrus Logic, Inc.
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
/****************************************
|
||||||
|
* PLEASE KEEP REG ADDRESSES SEQUENTIAL *
|
||||||
|
***************************************/
|
||||||
|
|
||||||
|
bq24190@0 {
|
||||||
|
compatible = "ti,bq24190";
|
||||||
|
reg = <0x0>;
|
||||||
|
status = "okay";
|
||||||
|
|
||||||
|
constant-charge-current-max-microamp = <1000000>;
|
||||||
|
constant-charge-voltage-max-microvolt = <4208000>;
|
||||||
|
};
|
1
tests/drivers/build_all/charger/prj.conf
Normal file
1
tests/drivers/build_all/charger/prj.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
CONFIG_CHARGER=y
|
9
tests/drivers/build_all/charger/src/main.c
Normal file
9
tests/drivers/build_all/charger/src/main.c
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Cirrus Logic, Inc.
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
10
tests/drivers/build_all/charger/testcase.yaml
Normal file
10
tests/drivers/build_all/charger/testcase.yaml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
# Copyright (c) 2023 Cirrus Logic, Inc.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
tests:
|
||||||
|
drivers.charger.build:
|
||||||
|
tags:
|
||||||
|
- drivers
|
||||||
|
- charger
|
||||||
|
build_only: true
|
||||||
|
platform_allow: native_posix
|
Loading…
Add table
Add a link
Reference in a new issue