summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zephyr/Kconfig12
-rw-r--r--zephyr/shim/include/config_chip.h5
2 files changed, 17 insertions, 0 deletions
diff --git a/zephyr/Kconfig b/zephyr/Kconfig
index 6351eef2bb..2440fd3773 100644
--- a/zephyr/Kconfig
+++ b/zephyr/Kconfig
@@ -395,6 +395,18 @@ config PLATFORM_EC_I2C
should make shimming other platform/ec modules which rely on i2c
communication "just work" without requiring any further code changes.
+config PLATFORM_EC_SMBUS_PEC
+ bool "Packet error checking support for SMBus"
+ help
+ If enabled, adds error checking support for i2c_readN, i2c_writeN,
+ i2c_read_string and i2c_write_block. Where
+ - write operation appends an error checking byte at end of transfer, and
+ - read operatoin verifies the correctness of error checking byte from the
+ slave.
+ Set I2C_FLAG on addr_flags parameter to use this feature.
+
+ This option also enables error checking function on smart batteries.
+
config PLATFORM_EC_LID_SWITCH
bool "Lid switch"
help
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 2da4af174b..a7346e6c8a 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -425,6 +425,11 @@
#define CONFIG_I2C_CONTROLLER
#endif
+#undef CONFIG_SMBUS_PEC
+#ifdef CONFIG_PLATFORM_EC_SMBUS_PEC
+#define CONFIG_SMBUS_PEC
+#endif
+
#undef CONFIG_KEYBOARD_PROTOCOL_8042
#ifdef CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_8042
#define CONFIG_KEYBOARD_PROTOCOL_8042