Hello Julian,

On 02.07.26 17:26, Julien Stephan wrote:
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 <[email protected]>
---
CMD_I2C relies on either the Driver Model I2C API or the legacy I2C
API, but its Kconfig currently does not enforce either dependency.

In order to not break some legacy I2C board, we need to keep
SYS_I2C_LEGACY in the depends on logic

$ ./tools/qconfig.py -f CMD_I2C ~DM_I2C
15 matches
MPC837XERDB cl-som-imx7 d2net_v2 db-88f6720 db-88f6820-gp inetspace_v2 
ls2080aqds_nand ls2080aqds_qspi ls2080ardb_nand net2big_v2 netspace_lite_v2 
netspace_max_v2 netspace_mini_v2 netspace_v2 work_92105
---
Changes in v2:
- Add SYS_I2C_LEGACY in the depends on logic
- Link to v1: 
https://patch.msgid.link/20260701-cmd-i2-add-dm-i2c-dependency-v1-1-19ebda3a8...@baylibre.com

Reviewed-by: Heiko Schocher <[email protected]>

Thanks!

bye,
Heiko

--
Nabla Software Engineering
HRB 40522 Augsburg
Phone: +49 821 45592596
E-Mail: [email protected]
Geschäftsführer : Stefano Babic

Reply via email to