diff options
author | Shawn Nematbakhsh <shawnn@chromium.org> | 2015-10-30 18:22:28 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-11-03 09:08:21 -0800 |
commit | 24316025756c6ccdccb06a35e0f343780ccfe0f0 (patch) | |
tree | 5222662e7e4e148ad07d7ab9ece3f18f6b59ecbd /board | |
parent | b1a3d8eda54e06bf2cf99bc7dd6abfa368a5bdab (diff) | |
download | chrome-ec-24316025756c6ccdccb06a35e0f343780ccfe0f0.tar.gz |
cleanup: Standardize use of CONFIG_I2C and add MASTER/SLAVE CONFIGs
Some chips previously defined CONFIG_I2C and others didn't. Standardize
the usage by removing CONFIG_I2C from all config_chip files and force it
to be defined at the board level. Also, make boards define
CONFIG_I2C_MASTER and/or CONFIG_I2C_SLAVE based on the I2C interfaces
they will use - this will assist with some later cleanup.
BUG=chromium:550206
TEST=`make buildall -j`
BRANCH=None
Change-Id: I2f0970e494ea49611abc315587c7c9aa0bc2d14a
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/310070
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/auron/board.h | 2 | ||||
-rw-r--r-- | board/bds/board.h | 2 | ||||
-rw-r--r-- | board/big/board.h | 1 | ||||
-rw-r--r-- | board/chell/board.h | 1 | ||||
-rw-r--r-- | board/glados/board.h | 1 | ||||
-rw-r--r-- | board/glados_pd/board.h | 2 | ||||
-rw-r--r-- | board/hadoken/board.h | 1 | ||||
-rw-r--r-- | board/honeybuns/board.h | 1 | ||||
-rw-r--r-- | board/it8380dev/board.h | 2 | ||||
-rw-r--r-- | board/jerry/board.h | 1 | ||||
-rw-r--r-- | board/kunimitsu/board.h | 1 | ||||
-rw-r--r-- | board/lars/board.h | 1 | ||||
-rw-r--r-- | board/llama/board.h | 1 | ||||
-rw-r--r-- | board/lucid/board.h | 2 | ||||
-rw-r--r-- | board/mec1322_evb/board.h | 2 | ||||
-rw-r--r-- | board/npcx_evb/board.h | 2 | ||||
-rw-r--r-- | board/npcx_evb_arm/board.h | 2 | ||||
-rw-r--r-- | board/oak/board.h | 1 | ||||
-rw-r--r-- | board/oak_pd/board.h | 2 | ||||
-rw-r--r-- | board/pdeval-stm32f072/board.h | 1 | ||||
-rw-r--r-- | board/pit/board.h | 1 | ||||
-rw-r--r-- | board/plankton/board.h | 1 | ||||
-rw-r--r-- | board/rambi/board.h | 2 | ||||
-rw-r--r-- | board/ryu/board.h | 2 | ||||
-rw-r--r-- | board/samus/board.h | 2 | ||||
-rw-r--r-- | board/samus_pd/board.h | 2 | ||||
-rw-r--r-- | board/strago/board.h | 1 | ||||
-rw-r--r-- | board/twinkie/board.h | 1 | ||||
-rw-r--r-- | board/wheatley/board.h | 1 |
29 files changed, 40 insertions, 2 deletions
diff --git a/board/auron/board.h b/board/auron/board.h index 647de67ff2..fbe1c4d1e8 100644 --- a/board/auron/board.h +++ b/board/auron/board.h @@ -22,6 +22,8 @@ #define CONFIG_CHARGER_DISCHARGE_ON_AC_CUSTOM #define CONFIG_CHIPSET_CAN_THROTTLE #define CONFIG_CHIPSET_HASWELL +#define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_POWER_COMMON #define CONFIG_POWER_SHUTDOWN_PAUSE_IN_S5 #define CONFIG_CMD_GSV diff --git a/board/bds/board.h b/board/bds/board.h index e4b48c55de..1d9b454769 100644 --- a/board/bds/board.h +++ b/board/bds/board.h @@ -10,6 +10,8 @@ /* Optional features */ #define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands */ +#define CONFIG_I2C +#define CONFIG_I2C_MASTER /* LM4 modules we don't use on link but still want to keep compiling */ #define CONFIG_EEPROM diff --git a/board/big/board.h b/board/big/board.h index 9f0f398e8b..aac61e1196 100644 --- a/board/big/board.h +++ b/board/big/board.h @@ -20,6 +20,7 @@ #define CONFIG_EXTPOWER_GPIO #define CONFIG_HOST_COMMAND_STATUS #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_SPI #define CONFIG_SPI_PROTOCOL_V2 diff --git a/board/chell/board.h b/board/chell/board.h index 752ac7278a..26edf1b1b6 100644 --- a/board/chell/board.h +++ b/board/chell/board.h @@ -33,6 +33,7 @@ #define CONFIG_EXTPOWER_GPIO #define CONFIG_HOSTCMD_PD #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_KEYBOARD_PROTOCOL_8042 #define CONFIG_KEYBOARD_COL2_INVERTED #define CONFIG_LED_COMMON diff --git a/board/glados/board.h b/board/glados/board.h index d783741c0d..e44d0dd96a 100644 --- a/board/glados/board.h +++ b/board/glados/board.h @@ -40,6 +40,7 @@ #define CONFIG_HOSTCMD_PD #define CONFIG_HOSTCMD_PD_PANIC #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_KEYBOARD_PROTOCOL_8042 #define CONFIG_LED_COMMON #define CONFIG_LID_ANGLE diff --git a/board/glados_pd/board.h b/board/glados_pd/board.h index e24aeef4ed..e87ef45e82 100644 --- a/board/glados_pd/board.h +++ b/board/glados_pd/board.h @@ -49,7 +49,7 @@ #undef CONFIG_HOSTCMD_EVENTS #define CONFIG_HW_CRC #define CONFIG_I2C -#define CONFIG_I2C_SLAVE_ONLY +#define CONFIG_I2C_SLAVE #undef CONFIG_LID_SWITCH #define CONFIG_LOW_POWER_IDLE #define CONFIG_LTO diff --git a/board/hadoken/board.h b/board/hadoken/board.h index ac61bc67b8..cd9784d98a 100644 --- a/board/hadoken/board.h +++ b/board/hadoken/board.h @@ -16,6 +16,7 @@ #undef CONFIG_LID_SWITCH #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_I2C_DEBUG /* diff --git a/board/honeybuns/board.h b/board/honeybuns/board.h index 2e23e93b4b..cb84dbfeb3 100644 --- a/board/honeybuns/board.h +++ b/board/honeybuns/board.h @@ -19,6 +19,7 @@ #define CONFIG_BOARD_PRE_INIT #define CONFIG_HW_CRC #define CONFIG_I2C +#define CONFIG_I2C_MASTER #undef CONFIG_LID_SWITCH #define CONFIG_SHA256 #define CONFIG_STM_HWTIMER32 diff --git a/board/it8380dev/board.h b/board/it8380dev/board.h index 3a34ad2792..0a1cc35caf 100644 --- a/board/it8380dev/board.h +++ b/board/it8380dev/board.h @@ -13,6 +13,8 @@ #define CONFIG_BATTERY_SMART #define CONFIG_FANS 1 +#define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_IT83XX_KEYBOARD_KSI_WUC_INT #define CONFIG_IT83XX_LPC_ACCESS_INT #define CONFIG_IT83XX_PECI_WITH_INTERRUPT diff --git a/board/jerry/board.h b/board/jerry/board.h index ffea9cc738..24c77b5fca 100644 --- a/board/jerry/board.h +++ b/board/jerry/board.h @@ -22,6 +22,7 @@ #define CONFIG_FORCE_CONSOLE_RESUME #define CONFIG_HOST_COMMAND_STATUS #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_I2C_VIRTUAL_BATTERY #define CONFIG_KEYBOARD_COL2_INVERTED #define CONFIG_KEYBOARD_PROTOCOL_MKBP diff --git a/board/kunimitsu/board.h b/board/kunimitsu/board.h index 0aa7edfcc0..a58fed90b1 100644 --- a/board/kunimitsu/board.h +++ b/board/kunimitsu/board.h @@ -61,6 +61,7 @@ #endif #define CONFIG_HOSTCMD_PD #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_KEYBOARD_COL2_INVERTED #undef CONFIG_KEYBOARD_KSO_BASE #define CONFIG_KEYBOARD_KSO_BASE 0 /* KSO starts from KSO04 */ diff --git a/board/lars/board.h b/board/lars/board.h index 95f72d5901..7fb5d1fa80 100644 --- a/board/lars/board.h +++ b/board/lars/board.h @@ -47,6 +47,7 @@ #define CONFIG_HOSTCMD_PD #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_KEYBOARD_COL2_INVERTED #undef CONFIG_KEYBOARD_KSO_BASE #define CONFIG_KEYBOARD_KSO_BASE 0 /* KSO starts from KSO04 */ diff --git a/board/llama/board.h b/board/llama/board.h index ecc845d4b8..4a6503b851 100644 --- a/board/llama/board.h +++ b/board/llama/board.h @@ -21,6 +21,7 @@ #define CONFIG_FORCE_CONSOLE_RESUME #define CONFIG_HOST_COMMAND_STATUS #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_KEYBOARD_COL2_INVERTED #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_LED_COMMON diff --git a/board/lucid/board.h b/board/lucid/board.h index 887cfe43ee..8062b57e7f 100644 --- a/board/lucid/board.h +++ b/board/lucid/board.h @@ -39,6 +39,8 @@ #define CONFIG_HIBERNATE_WAKEUP_PINS (STM32_PWR_CSR_EWUP2) #define CONFIG_HW_CRC #define CONFIG_I2C +#define CONFIG_I2C_MASTER +#define CONFIG_I2C_SLAVE #undef CONFIG_LID_SWITCH #define CONFIG_LOW_POWER_IDLE #define CONFIG_STM_HWTIMER32 diff --git a/board/mec1322_evb/board.h b/board/mec1322_evb/board.h index 58858de785..639c41a180 100644 --- a/board/mec1322_evb/board.h +++ b/board/mec1322_evb/board.h @@ -14,6 +14,8 @@ #define CONFIG_FANS 1 #define CONFIG_ADC #define CONFIG_FLASH_SIZE 0x00800000 +#define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_SPI_FLASH_W25Q64 #define CONFIG_SPI_FLASH_PORT 0 diff --git a/board/npcx_evb/board.h b/board/npcx_evb/board.h index 316ca3ede7..f6386c82c5 100644 --- a/board/npcx_evb/board.h +++ b/board/npcx_evb/board.h @@ -20,6 +20,8 @@ #define CONFIG_SPI_FLASH #define CONFIG_FLASH_SIZE 0x00800000 /* 8MB spi flash */ #define CONFIG_SPI_FLASH_W25Q64 +#define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_KEYBOARD_BOARD_CONFIG #define CONFIG_KEYBOARD_PROTOCOL_8042 #define CONFIG_POWER_BUTTON diff --git a/board/npcx_evb_arm/board.h b/board/npcx_evb_arm/board.h index b455f40473..4678d86224 100644 --- a/board/npcx_evb_arm/board.h +++ b/board/npcx_evb_arm/board.h @@ -17,6 +17,8 @@ #define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands for testing */ #define CONFIG_FLASH_SIZE 0x00800000 /* 8MB spi flash */ #define CONFIG_SPI_FLASH_W25Q64 +#define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_KEYBOARD_BOARD_CONFIG #define CONFIG_KEYBOARD_PROTOCOL_MKBP /* Instead of 8042 protocol of keyboard */ #define CONFIG_POWER_BUTTON diff --git a/board/oak/board.h b/board/oak/board.h index 3d5711494c..73a979a94c 100644 --- a/board/oak/board.h +++ b/board/oak/board.h @@ -51,6 +51,7 @@ #define CONFIG_HOSTCMD_PD #define CONFIG_HOSTCMD_PD_PANIC #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_KEYBOARD_COL2_INVERTED #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_LED_COMMON diff --git a/board/oak_pd/board.h b/board/oak_pd/board.h index f1ad61ea46..bc5894ac14 100644 --- a/board/oak_pd/board.h +++ b/board/oak_pd/board.h @@ -51,7 +51,7 @@ #undef CONFIG_HOSTCMD_EVENTS #define CONFIG_HW_CRC #define CONFIG_I2C -#define CONFIG_I2C_SLAVE_ONLY +#define CONFIG_I2C_SLAVE #undef CONFIG_LID_SWITCH #define CONFIG_LOW_POWER_IDLE #define CONFIG_LTO diff --git a/board/pdeval-stm32f072/board.h b/board/pdeval-stm32f072/board.h index 99f1e93ee0..8358420b93 100644 --- a/board/pdeval-stm32f072/board.h +++ b/board/pdeval-stm32f072/board.h @@ -18,6 +18,7 @@ /* Optional features */ #define CONFIG_HW_CRC #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_STM_HWTIMER32 /* USB Power Delivery configuration */ #define CONFIG_USB_POWER_DELIVERY diff --git a/board/pit/board.h b/board/pit/board.h index 10d99147e0..0dc766a506 100644 --- a/board/pit/board.h +++ b/board/pit/board.h @@ -17,6 +17,7 @@ #define CONFIG_EXTPOWER_GPIO #define CONFIG_HOST_COMMAND_STATUS #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_KEYBOARD_BOARD_CONFIG #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_PMU_HARD_RESET diff --git a/board/plankton/board.h b/board/plankton/board.h index 33f9165583..425216360a 100644 --- a/board/plankton/board.h +++ b/board/plankton/board.h @@ -33,6 +33,7 @@ #define CONFIG_ADC #define CONFIG_HW_CRC #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_INA219 #define CONFIG_IO_EXPANDER_PCA9534 #undef CONFIG_WATCHDOG_HELP diff --git a/board/rambi/board.h b/board/rambi/board.h index 7568aae85f..76ba1691f2 100644 --- a/board/rambi/board.h +++ b/board/rambi/board.h @@ -27,6 +27,8 @@ #define CONFIG_POWER_SHUTDOWN_PAUSE_IN_S5 #define CONFIG_CMD_GSV #define CONFIG_EXTPOWER_GPIO +#define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_I2C_PASSTHRU_RESTRICTED #define CONFIG_KEYBOARD_COL2_INVERTED #define CONFIG_KEYBOARD_IRQ_GPIO GPIO_KBD_IRQ_L diff --git a/board/ryu/board.h b/board/ryu/board.h index 6a438e6bcc..e4dc8401c8 100644 --- a/board/ryu/board.h +++ b/board/ryu/board.h @@ -56,6 +56,8 @@ #define CONFIG_ADC_SAMPLE_TIME 3 #define CONFIG_HW_CRC #define CONFIG_I2C +#define CONFIG_I2C_MASTER +#define CONFIG_I2C_SLAVE #define CONFIG_LID_SWITCH #define CONFIG_LID_SWITCH_GPIO_LIST LID_GPIO(GPIO_LID_OPEN)\ LID_GPIO(GPIO_BASE_PRES_L) diff --git a/board/samus/board.h b/board/samus/board.h index ba1e0c896d..a9221f2de9 100644 --- a/board/samus/board.h +++ b/board/samus/board.h @@ -29,6 +29,8 @@ #define CONFIG_POWER_COMMON #define CONFIG_POWER_SHUTDOWN_PAUSE_IN_S5 #define CONFIG_CHIPSET_CAN_THROTTLE +#define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_KEYBOARD_BOARD_CONFIG #define CONFIG_KEYBOARD_PROTOCOL_8042 #define CONFIG_KEYBOARD_COL2_INVERTED diff --git a/board/samus_pd/board.h b/board/samus_pd/board.h index a2cba6d77c..f647f14fac 100644 --- a/board/samus_pd/board.h +++ b/board/samus_pd/board.h @@ -38,6 +38,8 @@ #undef CONFIG_HOSTCMD_EVENTS #define CONFIG_HW_CRC #define CONFIG_I2C +#define CONFIG_I2C_MASTER +#define CONFIG_I2C_SLAVE #undef CONFIG_LID_SWITCH #define CONFIG_LOW_POWER_IDLE #undef CONFIG_PWM diff --git a/board/strago/board.h b/board/strago/board.h index 916b25d333..bb64cc5d6e 100644 --- a/board/strago/board.h +++ b/board/strago/board.h @@ -78,6 +78,7 @@ #define CONFIG_LED_COMMON #define CONFIG_I2C +#define CONFIG_I2C_MASTER /* Accelerometer */ #define CONFIG_ACCEL_KXCJ9 diff --git a/board/twinkie/board.h b/board/twinkie/board.h index 6ae82bac7e..e3c150fa34 100644 --- a/board/twinkie/board.h +++ b/board/twinkie/board.h @@ -44,6 +44,7 @@ #define CONFIG_ADC #define CONFIG_BOARD_PRE_INIT #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_INA231 #undef CONFIG_WATCHDOG_HELP #undef CONFIG_LID_SWITCH diff --git a/board/wheatley/board.h b/board/wheatley/board.h index 11d9a8e57f..cfbbb128d8 100644 --- a/board/wheatley/board.h +++ b/board/wheatley/board.h @@ -37,6 +37,7 @@ #define CONFIG_EXTPOWER_GPIO #define CONFIG_HOSTCMD_PD #define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_LPC #define CONFIG_UART_HOST 0 #define CONFIG_KEYBOARD_PROTOCOL_8042 |