• Nicolas Pitre's avatar
    Kconfig: Introduce the "imply" keyword · 237e3ad0
    Nicolas Pitre authored
    The "imply" keyword is a weak version of "select" where the target
    config symbol can still be turned off, avoiding those pitfalls that come
    with the "select" keyword.
    This is useful e.g. with multiple drivers that want to indicate their
    ability to hook into a secondary subsystem while allowing the user to
    configure that subsystem out without also having to unset these drivers.
    Currently, the same effect can almost be achieved with:
    config DRIVER_A
    config DRIVER_B
    config DRIVER_C
    config DRIVER_D
    config SUBSYSTEM_X
    	default DRIVER_A || DRIVER_B || DRIVER_C || DRIVER_D || [...]
    This is unwieldy to maintain especially with a large number of drivers.
    Furthermore, there is no easy way to restrict the choice for SUBSYSTEM_X
    to y or n, excluding m, when some drivers are built-in. The "select"
    keyword allows for excluding m, but it excludes n as well. Hence
    this "imply" keyword.  The above becomes:
    config DRIVER_A
    	imply SUBSYSTEM_X
    config DRIVER_B
    	imply SUBSYSTEM_X
    config SUBSYSTEM_X
    This is much cleaner, and way more flexible than "select". SUBSYSTEM_X
    can still be configured out, and it can be set as a module when none of
    the drivers are configured in or all of them are modular.
    Signed-off-by: default avatarNicolas Pitre <nico@linaro.org>
    Acked-by: default avatarRichard Cochran <richardcochran@gmail.com>
    Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Acked-by: default avatarJohn Stultz <john.stultz@linaro.org>
    Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
    Cc: Paul Bolle <pebolle@tiscali.nl>
    Cc: linux-kbuild@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Cc: Michal Marek <mmarek@suse.com>
    Cc: Edward Cree <ecree@solarflare.com>
    Link: http://lkml.kernel.org/r/1478841010-28605-2-git-send-email-nicolas.pitre@linaro.orgSigned-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Last commit
Last update
00-INDEX Loading commit data...
Kconfig.recursion-issue-01 Loading commit data...
Kconfig.recursion-issue-02 Loading commit data...
Kconfig.select-break Loading commit data...
headers_install.txt Loading commit data...
kbuild.txt Loading commit data...
kconfig-language.txt Loading commit data...
kconfig.txt Loading commit data...
makefiles.txt Loading commit data...
modules.txt Loading commit data...