diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/stress.c | 4 | ||||
-rw-r--r-- | test/test_config.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/test/stress.c b/test/stress.c index 72c5b75ced..18e15eafb9 100644 --- a/test/stress.c +++ b/test/stress.c @@ -78,7 +78,7 @@ static int stress(const char *name, /*****************************************************************************/ /* Tests */ -#if defined(CONFIG_I2C) && !defined(CONFIG_I2C_SLAVE_ONLY) +#ifdef CONFIG_I2C_MASTER static int test_i2c(void) { int res = EC_ERROR_UNKNOWN; @@ -135,7 +135,7 @@ void run_test(void) { test_reset(); -#if defined(CONFIG_I2C) && !defined(CONFIG_I2C_SLAVE_ONLY) +#ifdef CONFIG_I2C_MASTER RUN_STRESS_TEST("I2C Stress Test", test_i2c, I2C_TEST_ITERATION); #endif #ifdef CONFIG_ADC diff --git a/test/test_config.h b/test/test_config.h index ba645dff69..c2887ae1cc 100644 --- a/test/test_config.h +++ b/test/test_config.h @@ -57,6 +57,7 @@ #define CONFIG_CHARGER_DISCHARGE_ON_AC #define CONFIG_CHARGER_DISCHARGE_ON_AC_CUSTOM #define CONFIG_I2C +#define CONFIG_I2C_MASTER int board_discharge_on_ac(int enabled); #define I2C_PORT_MASTER 0 #define I2C_PORT_BATTERY 0 @@ -73,6 +74,7 @@ int board_discharge_on_ac(int enabled); #define CONFIG_CHARGER_DISCHARGE_ON_AC #define CONFIG_CHARGER_DISCHARGE_ON_AC_CUSTOM #define CONFIG_I2C +#define CONFIG_I2C_MASTER int board_discharge_on_ac(int enabled); #define I2C_PORT_MASTER 0 #define I2C_PORT_BATTERY 0 @@ -83,6 +85,7 @@ int board_discharge_on_ac(int enabled); #define CONFIG_CHIPSET_CAN_THROTTLE #define CONFIG_FANS 1 #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_TEMP_SENSOR #define CONFIG_THERMISTOR_NCP15WB #define I2C_PORT_THERMAL 0 @@ -103,6 +106,7 @@ int ncp15wb_calculate_temp(uint16_t adc); #define CONFIG_BATTERY_SMART #define CONFIG_CHARGER_INPUT_CURRENT 4032 #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define I2C_PORT_MASTER 0 #define I2C_PORT_BATTERY 0 #define I2C_PORT_CHARGER 0 @@ -110,6 +114,7 @@ int ncp15wb_calculate_temp(uint16_t adc); #ifdef TEST_LIGHTBAR #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define I2C_PORT_LIGHTBAR 0 #define CONFIG_ALS_LIGHTBAR_DIMMING 0 #endif |