[PATCH] cmd: kconfig: i2c: add DM_I2C dependency

Julien Stephan jstephan at baylibre.com
Wed Jul 1 17:55:14 CEST 2026


CMD_I2C depends on the DM I2C API but currently does not enforce
DM_I2C in Kconfig.

This can lead to link errors caused by unresolved i2c_* symbols when
CMD_I2C is enabled without DM_I2C.

Add the missing dependency to prevent unsupported configurations.

Signed-off-by: Julien Stephan <jstephan at baylibre.com>
---
 cmd/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index 032e55e8127..636891ed493 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1392,6 +1392,7 @@ config CMD_IOTRACE
 
 config CMD_I2C
 	bool "i2c"
+	depends on DM_I2C
 	help
 	  I2C support.
 

---
base-commit: 23a4f1e22076855df9c8dd93992edd9bd42d7ea2
change-id: 20260701-cmd-i2-add-dm-i2c-dependency-d8b349b9f0b2

Best regards,
--  
Julien Stephan <jstephan at baylibre.com>



More information about the U-Boot mailing list