]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
cmd: kconfig: i2c: add missing I2C API dependency
authorJulien Stephan <jstephan@baylibre.com>
Thu, 2 Jul 2026 15:26:57 +0000 (17:26 +0200)
committerHeiko Schocher <hs@nabladev.com>
Thu, 9 Jul 2026 05:18:18 +0000 (07:18 +0200)
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>
cmd/Kconfig

index ca1039f6a03b102c92815e79e820a35c766dccc4..637119d3ff5960cda93e2d8ed26061e39ac132be 100644 (file)
@@ -1399,6 +1399,7 @@ config CMD_IOTRACE
 
 config CMD_I2C
        bool "i2c"
+       depends on DM_I2C || SYS_I2C_LEGACY
        help
          I2C support.