From patchwork Fri Apr 29 10:43:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Gouders X-Patchwork-Id: 8979621 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 50BD1BF29F for ; Fri, 29 Apr 2016 10:44:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C913220212 for ; Fri, 29 Apr 2016 10:44:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A8A07201CD for ; Fri, 29 Apr 2016 10:44:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752599AbcD2Kn5 (ORCPT ); Fri, 29 Apr 2016 06:43:57 -0400 Received: from services.gouders.net ([141.101.32.176]:35468 "EHLO services.gouders.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752595AbcD2Kn4 (ORCPT ); Fri, 29 Apr 2016 06:43:56 -0400 Received: from localhost ([193.175.198.193]) (authenticated bits=0) by services.gouders.net (8.14.8/8.14.8) with ESMTP id u3TAhoJ8020866 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Apr 2016 12:43:50 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gouders.net; s=gnet; t=1461926630; bh=/xjPakX6MMWzqsIgPxMEkzcT8YudRf8MuzUIP6ErZys=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=cqJhrSM4xjO46+0VWR+f1AYB+gtucFdmkDhkT0MITzJdJvHSjAGVnbn6vaFoEPNDz yIfYxOpS7J5Icz3BgUURFwqD/jcqOey6ju7T0rcWc5diM3GQCg47Faqgc6cLOB2/WJ 7ptwnv2LR+zPeQVQV/BO8gkDMnNMO6MLWRPF8PG4= From: Dirk Gouders To: Michal Marek Cc: Jonathan Corbet , linux-kbuild@vger.kernel.org Subject: [PATCH 2/2] kconfig-language: elaborate on the type of a choice In-Reply-To: (Dirk Gouders's message of "Fri, 29 Apr 2016 12:25:34 +0200") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Date: Fri, 29 Apr 2016 12:43:38 +0200 Message-ID: MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00, DKIM_ADSP_DISCARD, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The type of a choice can be specified explicitely or it will be set according to members of the choice group, see menu.c:menu_finalize(). Signed-off-by: Dirk Gouders --- Documentation/kbuild/kconfig-language.txt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Documentation/kbuild/kconfig-language.txt b/Documentation/kbuild/kconfig-language.txt index 14dd131..db10185 100644 --- a/Documentation/kbuild/kconfig-language.txt +++ b/Documentation/kbuild/kconfig-language.txt @@ -284,12 +284,17 @@ choices: "endchoice" This defines a choice group and accepts any of the above attributes as -options. A choice can only be of type bool or tristate, while a boolean -choice only allows a single config entry to be selected, a tristate -choice also allows any number of config entries to be set to 'm'. This -can be used if multiple drivers for a single hardware exists and only a -single driver can be compiled/loaded into the kernel, but all drivers -can be compiled as modules. +options. A choice can only be of type bool or tristate. If no type is +specified for a choice, it's type will be determined by the type of +the first choice element in the group or remain unknown if none of the +choice elements have a type specified, as well. + +While a boolean choice only allows a single config entry to be +selected, a tristate choice also allows any number of config entries +to be set to 'm'. This can be used if multiple drivers for a single +hardware exists and only a single driver can be compiled/loaded into +the kernel, but all drivers can be compiled as modules. + A choice accepts another option "optional", which allows to set the choice to 'n' and no entry needs to be selected. If no [symbol] is associated with a choice, then you can not have multiple