summaryrefslogtreecommitdiff
path: root/common/build.mk
diff options
context:
space:
mode:
authorphilipchen <philipchen@google.com>2016-11-05 17:08:15 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-12-14 06:03:14 -0800
commit4912f214aabf4c9ba231329df0d3583c5ddea9d6 (patch)
treed1c9f020ca8784242396ac000b393709f2fa3383 /common/build.mk
parentc648430a6d3bd525becb523bf50703f16e147515 (diff)
downloadchrome-ec-4912f214aabf4c9ba231329df0d3583c5ddea9d6.tar.gz
i2c_passthru: fix virtual battery operation
In some cases, the virtual battery code creates transactions that violate SB spec. One example: If the host command is structured as two messages - a write to 0x03 (reg addr), followed by two bytes of write data, the first byte of the second message (write data) will be sent to virtual_battery_read(), as if it were a reg read request. Let's do the following change for virtual battery: 1. Parse the command more carefully with state machines. 2. Support write caching for some critical registers. 3. Cache more attributes (0x03 and 0x0f). BUG=chrome-os-partner:59239, chromium:659819 BRANCH=none TEST='power_supply_info' works on kevin Change-Id: Icdeb12b21f0dc3c329f29b206b7b9395ca4c9998 Reviewed-on: https://chromium-review.googlesource.com/407987 Commit-Ready: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
Diffstat (limited to 'common/build.mk')
-rw-r--r--common/build.mk1
1 files changed, 1 insertions, 0 deletions
diff --git a/common/build.mk b/common/build.mk
index 4010903e18..541dc55ed2 100644
--- a/common/build.mk
+++ b/common/build.mk
@@ -54,6 +54,7 @@ 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_VIRTUAL_BATTERY)+=virtual_battery.o
common-$(CONFIG_INDUCTIVE_CHARGING)+=inductive_charging.o
common-$(CONFIG_KEYBOARD_PROTOCOL_8042)+=keyboard_8042.o \
keyboard_8042_sharedlib.o