cmd: kconfig: i2c: add missing I2C API dependency

CMD_I2C relies on either the Driver Model I2C API or the legacy I2C
API, but its Kconfig currently does not enforce either dependency.

As a result, enabling CMD_I2C without DM_I2C or SYS_I2C_LEGACY can lead
to link errors due to unresolved i2c_* symbols.

Require either DM_I2C or SYS_I2C_LEGACY to prevent unsupported
configurations while preserving support for legacy platforms.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
This commit is contained in:
Julien Stephan
2026-07-09 07:18:18 +02:00
committed by Heiko Schocher
parent b8487e7e2d
commit 0ded029735
+1
View File
@@ -1399,6 +1399,7 @@ config CMD_IOTRACE
config CMD_I2C
bool "i2c"
depends on DM_I2C || SYS_I2C_LEGACY
help
I2C support.