Skip to content

Commit e8d40df

Browse files
committed
tests: build_all: add dts.fixup to deal with compile issues
The following drivers are in the process of support getting their I2C name, bus, address params from device tree. However if a given board that supports device tree doesn't have one of these sensors we can't build it. To address this we add a dummy dts.fixup at the application level with provides values for the defines we'd normally get from the dts generation. Fixes: #5722 Signed-off-by: Kumar Gala <[email protected]>
1 parent d06b650 commit e8d40df

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

tests/drivers/build_all/dts.fixup

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#if defined(CONFIG_HAS_DTS_I2C_DEVICE)
2+
3+
#ifndef CONFIG_FXAS21002_NAME
4+
#define CONFIG_FXAS21002_NAME ""
5+
#define CONFIG_FXAS21002_I2C_ADDRESS 0
6+
#define CONFIG_FXAS21002_I2C_NAME ""
7+
#endif
8+
9+
#ifndef CONFIG_FXOS8700_NAME
10+
#define CONFIG_FXOS8700_NAME ""
11+
#define CONFIG_FXOS8700_I2C_NAME ""
12+
#define CONFIG_FXOS8700_I2C_ADDRESS 0
13+
#endif
14+
15+
#ifndef CONFIG_HTS221_NAME
16+
#define CONFIG_HTS221_NAME ""
17+
#define CONFIG_HTS221_I2C_MASTER_DEV_NAME ""
18+
#endif
19+
20+
#ifndef CONFIG_LIS3MDL_NAME
21+
#define CONFIG_LIS3MDL_NAME ""
22+
#define CONFIG_LIS3MDL_I2C_MASTER_DEV_NAME ""
23+
#define CONFIG_LIS3MDL_I2C_ADDR 0x1e
24+
#endif
25+
26+
#ifndef CONFIG_MAX30101_NAME
27+
#define CONFIG_MAX30101_I2C_NAME ""
28+
#define CONFIG_MAX30101_NAME ""
29+
#endif
30+
31+
#endif /* CONFIG_HAS_DTS_I2C_DEVICE */

0 commit comments

Comments
 (0)