From 74d1673daa17d9503f21cdf86bfd552873d1aefa Mon Sep 17 00:00:00 2001 From: Mary Ruthven Date: Tue, 5 Jan 2021 16:54:53 -0800 Subject: coil: CONFIG_I2C_MASTER -> CONFIG_I2C_CONTROLLER BUG=b:175244613 TEST=make buildall -j Change-Id: I74900cd9113c12e5e08a0770e30f3abf69816302 Signed-off-by: Mary Ruthven Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2611757 Reviewed-by: Namyoon Woo --- board/bds/board.h | 2 +- board/cr50/board.h | 2 +- chip/g/build.mk | 2 +- common/build.mk | 2 +- common/ec_features.c | 2 +- common/main.c | 2 +- common/system.c | 2 +- include/config.h | 4 ++-- include/i2c.h | 4 ++-- test/stress.c | 4 ++-- test/test_config.h | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/board/bds/board.h b/board/bds/board.h index f43ea6ee92..c859089f04 100644 --- a/board/bds/board.h +++ b/board/bds/board.h @@ -11,7 +11,7 @@ /* Optional features */ #define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands */ #define CONFIG_I2C -#define CONFIG_I2C_MASTER +#define CONFIG_I2C_CONTROLLER /* LM4 modules we don't use on link but still want to keep compiling */ #define CONFIG_EEPROM diff --git a/board/cr50/board.h b/board/cr50/board.h index b11d4c42ad..7e3efc79bd 100644 --- a/board/cr50/board.h +++ b/board/cr50/board.h @@ -507,7 +507,7 @@ enum nvmem_users { #define CONFIG_USB_FW_UPDATE #define CONFIG_I2C -#define CONFIG_I2C_MASTER +#define CONFIG_I2C_CONTROLLER #define CONFIG_I2C_PERIPH #define CONFIG_TPM_I2CS diff --git a/chip/g/build.mk b/chip/g/build.mk index 9564837834..05e1827a8f 100644 --- a/chip/g/build.mk +++ b/chip/g/build.mk @@ -82,7 +82,7 @@ chip-$(CONFIG_RDD)+=rdd.o chip-$(CONFIG_RBOX)+=rbox.o chip-$(CONFIG_STREAM_USB)+=usb-stream.o chip-$(CONFIG_STREAM_USART)+=usart.o -chip-$(CONFIG_I2C_MASTER)+= i2cm.o +chip-$(CONFIG_I2C_CONTROLLER)+= i2cm.o chip-$(CONFIG_I2C_PERIPH)+= i2cs.o chip-$(CONFIG_LOW_POWER_IDLE)+=idle.o diff --git a/common/build.mk b/common/build.mk index 8e2784922e..e4e0fb151d 100644 --- a/common/build.mk +++ b/common/build.mk @@ -72,7 +72,7 @@ common-$(CONFIG_HOSTCMD_EVENTS)+=host_event_commands.o common-$(CONFIG_HOSTCMD_GET_UPTIME_INFO)+=uptime.o common-$(CONFIG_HOSTCMD_RTC)+=rtc.o common-$(CONFIG_I2C_DEBUG)+=i2c_trace.o -common-$(CONFIG_I2C_MASTER)+=i2c_master.o +common-$(CONFIG_I2C_CONTROLLER)+=i2c_master.o common-$(CONFIG_I2C_PERIPH)+=i2c_slave.o common-$(CONFIG_INDUCTIVE_CHARGING)+=inductive_charging.o common-$(CONFIG_KEYBOARD_PROTOCOL_8042)+=keyboard_8042.o \ diff --git a/common/ec_features.c b/common/ec_features.c index 2a04a7c71e..aca031fbd0 100644 --- a/common/ec_features.c +++ b/common/ec_features.c @@ -58,7 +58,7 @@ uint32_t get_feature_flags0(void) #ifdef CONFIG_COMMON_GPIO | EC_FEATURE_MASK_0(EC_FEATURE_GPIO) #endif -#ifdef CONFIG_I2C_MASTER +#ifdef CONFIG_I2C_CONTROLLER | EC_FEATURE_MASK_0(EC_FEATURE_I2C) #endif #ifdef CONFIG_CHARGER diff --git a/common/main.c b/common/main.c index 5bbe6f8a55..458327a3c2 100644 --- a/common/main.c +++ b/common/main.c @@ -181,7 +181,7 @@ test_mockable __keep int main(void) #ifdef CONFIG_HOSTCMD_X86 lpc_init_mask(); #endif - if (IS_ENABLED(CONFIG_I2C_MASTER)) { + if (IS_ENABLED(CONFIG_I2C_CONTROLLER)) { /* * Some devices (like the I2C keyboards, CBI) need I2C access * pretty early, so let's initialize the controller now. diff --git a/common/system.c b/common/system.c index d9a40f8099..469ee9f8b9 100644 --- a/common/system.c +++ b/common/system.c @@ -494,7 +494,7 @@ static void jump_to_image(uintptr_t init_addr) pd_prepare_sysjump(); #endif -#ifdef CONFIG_I2C_MASTER +#ifdef CONFIG_I2C_CONTROLLER /* Prepare I2C module for sysjump */ i2c_prepare_sysjump(); #endif diff --git a/include/config.h b/include/config.h index 063e3159e3..52e1771081 100644 --- a/include/config.h +++ b/include/config.h @@ -2156,11 +2156,11 @@ #undef CONFIG_I2C_XFER_BOARD_CALLBACK /* - * EC uses an I2C master interface. + * EC uses an I2C controller interface. * Note: if this is defined, i2c_init() will be called * automatically at board boot. */ -#undef CONFIG_I2C_MASTER +#undef CONFIG_I2C_CONTROLLER /* EC uses an I2C slave interface */ #undef CONFIG_I2C_PERIPH diff --git a/include/i2c.h b/include/i2c.h index c3fab8a723..8ec73ac03e 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -450,8 +450,8 @@ void i2c_data_received(int port, uint8_t *buf, int len); int i2c_set_response(int port, uint8_t *buf, int len); /* - * Initialize i2c master controller. Automatically called at board boot - * if CONFIG_I2C_MASTER is defined. + * Initialize i2c controller. Automatically called at board boot if + * CONFIG_I2C_CONTROLLER is defined. */ void i2c_init(void); diff --git a/test/stress.c b/test/stress.c index 3808cc2bd1..442c4b498e 100644 --- a/test/stress.c +++ b/test/stress.c @@ -75,7 +75,7 @@ static int stress(const char *name, /*****************************************************************************/ /* Tests */ -#ifdef CONFIG_I2C_MASTER +#ifdef CONFIG_I2C_CONTROLLER static int test_i2c(void) { int res = EC_ERROR_UNKNOWN; @@ -132,7 +132,7 @@ void run_test(void) { test_reset(); -#ifdef CONFIG_I2C_MASTER +#ifdef CONFIG_I2C_CONTROLLER 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 6afb8f6417..75ca65a6c3 100644 --- a/test/test_config.h +++ b/test/test_config.h @@ -112,7 +112,7 @@ #define CONFIG_CHIPSET_CAN_THROTTLE #define CONFIG_FANS 1 #define CONFIG_I2C -#define CONFIG_I2C_MASTER +#define CONFIG_I2C_CONTROLLER #define CONFIG_TEMP_SENSOR #define CONFIG_THROTTLE_AP #define CONFIG_THERMISTOR -- cgit v1.2.1