Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40515 )
Change subject: ec/google/chromeec: Add driver for i2c_tunnel device under Chrome EC ......................................................................
Patch Set 11:
(1 comment)
https://review.coreboot.org/c/coreboot/+/40515/11/src/ec/google/chromeec/Kco... File src/ec/google/chromeec/Kconfig:
https://review.coreboot.org/c/coreboot/+/40515/11/src/ec/google/chromeec/Kco... PS11, Line 200: if EC_GOOGLE_CHROMEEC
This makes it look as if the files won't get sourced unless EC_GOOGLE_CHROMEEC is set, which isn't […]
The 'source' command always pulls in the associated files and cannot be made conditional
The if command behaves the same as if statements anywhere else. configs won't be used, selects inside the if statement won't be selected, etc.
However, For example, something could use a select to enable a config option that's only available inside the if statement.
I've made this same recommendation not to do this in other places, and even put a note about in the kconfig documentation. It generally isn't harmful, but it doesn't do what it looks like it does. It's similar, but not quite the same.
https://doc.coreboot.org/getting_started/kconfig.html?highlight=kconfig#sour...