On 15/02/2025 12:42, Krzysztof Kozlowski wrote: > @@ -580,10 +582,15 @@ Some drivers are able to optionally use a feature from another module > or build cleanly with that module disabled, but cause a link failure > when trying to use that loadable module from a built-in driver. > > -The most common way to express this optional dependency in Kconfig logic > -uses the slightly counterintuitive:: > +There are two ways to express this optional dependency: > > - config FOO > +1. If pre-processor can discard entire optional code or module FOO does not > + provide !FOO stubs then in the C code :ref:`IS_REACHABLE<is_reachable>` > + > +2. Otherwise (and module FOO must provide all !FOO stubs) use the slightly Obviously this should be "module BAR", similarly above. I will send a v2. > + counterintuitive Kconfig syntax:: > + > + config FOO > tristate "Support for foo hardware" > depends on BAR || !BAR > Best regards, Krzysztof