Skip to content

Commit 9599c2d

Browse files
galakMaureenHelm
authored andcommitted
tests: boards: altera_max10: Use DT define for I2C device name
Move to using DT define instead of a Kconfig param, also remove unused I2C Kconfig params for this test. Signed-off-by: Kumar Gala <[email protected]>
1 parent 5c57abc commit 9599c2d

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

tests/boards/altera_max10/i2c_master/prj.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@ CONFIG_I2C=y
22
CONFIG_I2C_NIOS2=y
33
CONFIG_I2C_INIT_PRIORITY=60
44
CONFIG_I2C_0=y
5-
CONFIG_I2C_0_NAME="I2C_0"
6-
CONFIG_I2C_0_DEFAULT_CFG=0x0
75
CONFIG_I2C_0_IRQ_PRI=10
86
CONFIG_ZTEST=y

tests/boards/altera_max10/i2c_master/src/i2c_master.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static int powerup_adv7513(struct device *i2c_dev)
6565

6666
static int test_i2c_adv7513(void)
6767
{
68-
struct device *i2c_dev = device_get_binding(CONFIG_I2C_0_NAME);
68+
struct device *i2c_dev = device_get_binding(DT_INST_0_NIOS2_I2C_LABEL);
6969
u32_t i2c_cfg = I2C_SPEED_SET(I2C_SPEED_STANDARD) | I2C_MODE_MASTER;
7070
u8_t data;
7171

0 commit comments

Comments
 (0)