diff options
author | Wei-Ning Huang <wnhuang@google.com> | 2017-04-21 23:32:53 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-04-26 13:37:04 -0700 |
commit | 59bd55c41e02eab2ac01cd3adbdda1950f7fb09e (patch) | |
tree | d580917ddd736d45812f7e5b54a31ffb2b60f08e /common/build.mk | |
parent | ee28ccb0ca0a76ff3c097471ba7732facf404663 (diff) | |
download | chrome-ec-59bd55c41e02eab2ac01cd3adbdda1950f7fb09e.tar.gz |
i2c: separate slave and master code
Split i2c.c code in two (i2c_slave.c and i2c_master.c). i2c_slave.c is
used when EC has no i2c device connected (i2c master code not needed)
but EC is connected to AP via i2c.
BRANCH=none
BUG=b:37584134
TEST=1. Compile rose board with CONFIG_I2C and CONFIG_CMD_HOSTCMD. Then
make sure EC_CMD_GET_PROTOCOL_INFO works.
2. On Kevin and Elm, cherry-pick to firmware branch respectively,
build and flash ec, i2c function works.
Change-Id: I1f95ad277713c5e30913e0a010ca03dfd9ec248c
Signed-off-by: Wei-Ning Huang <wnhuang@google.com>
Reviewed-on: https://chromium-review.googlesource.com/484999
Commit-Ready: Wei-Ning Huang <wnhuang@chromium.org>
Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common/build.mk')
-rw-r--r-- | common/build.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/build.mk b/common/build.mk index 630e9f9eaa..47b8f8add6 100644 --- a/common/build.mk +++ b/common/build.mk @@ -56,7 +56,8 @@ common-$(CONFIG_FMAP)+=fmap.o common-$(CONFIG_GESTURE_SW_DETECTION)+=gesture.o common-$(CONFIG_HOSTCMD_EVENTS)+=host_event_commands.o common-$(CONFIG_HOSTCMD_PD)+=host_command_master.o -common-$(CONFIG_I2C_MASTER)+=i2c.o +common-$(CONFIG_I2C_MASTER)+=i2c_master.o +common-$(CONFIG_I2C_SLAVE)+=i2c_slave.o common-$(CONFIG_I2C_VIRTUAL_BATTERY)+=virtual_battery.o common-$(CONFIG_INDUCTIVE_CHARGING)+=inductive_charging.o common-$(CONFIG_KEYBOARD_PROTOCOL_8042)+=keyboard_8042.o \ |