Skip to content

Commit 20ff7dd

Browse files
soburinashif
authored andcommitted
tests: drivers: build_all: pwm: Add i2c-devices build test
Add build tests for following devices. - maxim,max31790-pwm - nxp,pca9685-pwm Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent f3e870d commit 20ff7dd

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (c) 2024 TOKITA Hiroshi
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/ {
7+
test {
8+
#address-cells = <1>;
9+
#size-cells = <1>;
10+
11+
test_i2c: i2c@11112222 {
12+
#address-cells = <1>;
13+
#size-cells = <0>;
14+
compatible = "vnd,i2c";
15+
reg = <0x11112222 0x1000>;
16+
status = "okay";
17+
clock-frequency = <100000>;
18+
19+
test_i2c_max31790: max31790@0 {
20+
compatible = "maxim,max31790";
21+
status = "okay";
22+
reg = <0x0>;
23+
24+
max31790_max31790_pwm: max31790_max31790_pwm {
25+
compatible = "maxim,max31790-pwm";
26+
status = "okay";
27+
pwm-controller;
28+
#pwm-cells = <2>;
29+
};
30+
};
31+
32+
test_i2c_pca9685: pca9685@1 {
33+
status = "okay";
34+
compatible = "nxp,pca9685-pwm";
35+
reg = <0x1>;
36+
#pwm-cells = <2>;
37+
};
38+
};
39+
};
40+
};

tests/drivers/build_all/pwm/testcase.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,10 @@ tests:
5050
drivers.pwm.build.xlnx:
5151
platform_allow: arty_a7/designstart_fpga_cortex_m1
5252
drivers.pwm.build.test:
53-
platform_allow: qemu_cortex_m3
53+
platform_allow:
54+
- qemu_cortex_m3
55+
- native_sim
56+
- native_sim/native/64
5457
drivers.pwm.max31790.build:
5558
platform_allow: nucleo_f429zi
5659
extra_args: DTC_OVERLAY_FILE=max31790.overlay

0 commit comments

Comments
 (0)