diff options
author | Aseda Aboagye <aaboagye@google.com> | 2018-08-19 17:14:29 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-08-22 00:10:38 -0700 |
commit | fe16ade3ea5dfdd01cf466a9a6bff76d8fa17f11 (patch) | |
tree | f8dde4ea45bb74f588ea111b6094a0e2a8c0e14f /include/config.h | |
parent | af908bfce225415c01d56b3f57cfc399d8485d3e (diff) | |
download | chrome-ec-fe16ade3ea5dfdd01cf466a9a6bff76d8fa17f11.tar.gz |
i2c: Don't try to unwedge unpowered busses.
If an i2c bus is known to be unpowered, we should not spend time trying
to unwedge it. It's futile, so stop trying. This commit adds a config
option,
CONFIG_I2C_BUS_MAY_BE_UNPOWERED
which can be defined by a board if a bus may be unpowered during
runtime.
BUG=b:111683988
BRANCH=nocturne
TEST=Verify that unwedge attempts are skipped if the bus is deemed
unpowered.
Change-Id: Ice12b3957121be476ef0173a86f239f183010b47
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1182877
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Diffstat (limited to 'include/config.h')
-rw-r--r-- | include/config.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h index a5c17ad9b5..84f3b0ad65 100644 --- a/include/config.h +++ b/include/config.h @@ -1857,6 +1857,15 @@ #undef CONFIG_I2C_VIRTUAL_BATTERY /* + * Define this option if an i2c bus may be unpowered at a certain point during + * runtime. An example could be, a sensor bus which is not needed in lower + * power states so the power rail for those sensors is completely disabled. + * + * If defined, your board must provide a board_is_i2c_port_powered() function. + */ +#undef CONFIG_I2C_BUS_MAY_BE_UNPOWERED + +/* * Conservative I2C reading size per single transaction. For example, register * of stm32f0 and stm32l4 are limited to be 8 bits for this field. */ |