From 62eb3b6338ba083d156ea63a32748996eab0741d Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Fri, 11 Nov 2022 15:13:10 +0000 Subject: zephyr: Kconfig: enable PLATFORM_EC_I2C automatically Enable PLATFORM_EC_I2C automatically based on the presence of the named-i2c-node, select I2C automatically as well, drop all the now redundant config options and safety checks. Note that the DT_PATH check is not exactly equivalent to the DT_HAS_NAMED_I2C_PORTS_ENABLED dependency, will address that in a followup patch. BRANCH=none BUG=none TEST=cq dry run Signed-off-by: Fabio Baltieri Change-Id: I38e9725e63a02caae8f5efb1224262ee0430efb2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4023447 Reviewed-by: Jeremy Bettis Code-Coverage: Zoss --- zephyr/Kconfig.i2c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'zephyr/Kconfig.i2c') diff --git a/zephyr/Kconfig.i2c b/zephyr/Kconfig.i2c index 0187409b31..9fa1d274aa 100644 --- a/zephyr/Kconfig.i2c +++ b/zephyr/Kconfig.i2c @@ -3,7 +3,10 @@ # found in the LICENSE file. config PLATFORM_EC_I2C - def_bool I2C + bool "EC I2C Support" + default y + depends on DT_HAS_NAMED_I2C_PORTS_ENABLED + select I2C help Enable compilation of the EC i2c module. Once enabled, it will be possible to make calls using the old platform/ec i2c APIs defined -- cgit v1.2.1