diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2014-07-18 15:06:22 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-07-20 07:46:37 +0000 |
commit | 4eee9fe42688e77c6c845a3904adb531a75f569a (patch) | |
tree | 91c763be46e70bb1ebe34ea982d88247146cd2bf /board | |
parent | 3bb7de950f007ec554d73f0d2b480c68e562e5bc (diff) | |
download | chrome-ec-4eee9fe42688e77c6c845a3904adb531a75f569a.tar.gz |
i2c: Add variable to set slave address of the EC.stabilize-6082.B
Only one EC was an i2c slave, samus_pd.
Now we have 2 more, ryu and ryu_sh (sensor hub).
Define a new variable: CONFIG_HOSTCMD_I2C_SLAVE_ADDR
TEST=Compiled
BRANCH=None
BUG=chrome-os-partner:30740
Change-Id: I484aaf5ca72f14a91ce261b91fbe600dca3474dc
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/208978
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/ryu/board.h | 5 | ||||
-rw-r--r-- | board/samus_pd/board.h | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/board/ryu/board.h b/board/ryu/board.h index 0e7087a98b..6c38c4863b 100644 --- a/board/ryu/board.h +++ b/board/ryu/board.h @@ -51,6 +51,11 @@ #define I2C_PORT_CHARGER I2C_PORT_MASTER #define I2C_PORT_BATTERY I2C_PORT_MASTER +/* slave address for host commands */ +#ifdef HAS_TASK_HOSTCMD +#define CONFIG_HOSTCMD_I2C_SLAVE_ADDR 0x3c +#endif + #ifndef __ASSEMBLER__ /* Timer selection */ diff --git a/board/samus_pd/board.h b/board/samus_pd/board.h index b84771a352..fc3eaff898 100644 --- a/board/samus_pd/board.h +++ b/board/samus_pd/board.h @@ -34,6 +34,11 @@ #define I2C_PORT_SLAVE 0 #define I2C_PORT_EC I2C_PORT_SLAVE +/* slave address for host commands */ +#ifdef HAS_TASK_HOSTCMD +#define CONFIG_HOSTCMD_I2C_SLAVE_ADDR CONFIG_USB_PD_I2C_SLAVE_ADDR +#endif + /* * Allow dangerous commands all the time, since we don't have a write protect * switch. |