summaryrefslogtreecommitdiff
path: root/test/stress.c
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2015-10-30 18:22:28 -0700
committerchrome-bot <chrome-bot@chromium.org>2015-11-03 09:08:21 -0800
commit24316025756c6ccdccb06a35e0f343780ccfe0f0 (patch)
tree5222662e7e4e148ad07d7ab9ece3f18f6b59ecbd /test/stress.c
parentb1a3d8eda54e06bf2cf99bc7dd6abfa368a5bdab (diff)
downloadchrome-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 'test/stress.c')
-rw-r--r--test/stress.c4
1 files changed, 2 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