From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753396Ab2HANOt (ORCPT ); Wed, 1 Aug 2012 09:14:49 -0400 Received: from smtp-out-181.synserver.de ([212.40.185.181]:1071 "EHLO smtp-out-181.synserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751356Ab2HANOs (ORCPT ); Wed, 1 Aug 2012 09:14:48 -0400 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 4201 Message-ID: <50192CBF.6040903@metafoo.de> Date: Wed, 01 Aug 2012 15:18:55 +0200 From: Lars-Peter Clausen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120624 Icedove/10.0.5 MIME-Version: 1.0 To: Steven Rostedt CC: Borislav Petkov , Thierry Reding , Dave Jones , Linux Kernel Subject: Re: awful kconfig help texts. References: <20120731151600.GA19412@redhat.com> <20120731170741.GA4735@x1.osrc.amd.com> <20120731172638.GE16873@home.goodmis.org> <20120731174249.GB4735@x1.osrc.amd.com> <20120801074742.GH29673@avionic-0098.adnet.avionic-design.de> <20120801085644.GA21303@liondog.tnic> <5018F537.209@metafoo.de> <20120801092625.GB21303@liondog.tnic> <5018F908.9090607@metafoo.de> <20120801100455.GD21303@liondog.tnic> <50190B67.5050108@metafoo.de> <1343825179.27983.76.camel@gandalf.stny.rr.com> In-Reply-To: <1343825179.27983.76.camel@gandalf.stny.rr.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/01/2012 02:46 PM, Steven Rostedt wrote: > On Wed, 2012-08-01 at 12:56 +0200, Lars-Peter Clausen wrote: > >> You could do that by using a construct like below, but well... >> >> config HAS_PWM >> bool >> >> config PWM >> bool "PWM >> depends on HAS_PWM >> >> config PWM_CAN_BUILD_DRIVER_X >> defbool I2C >> select HAS_PWM >> >> config PWM_DRIVER_X >> tristate "PWM chip X support" >> depends on PWM && PWM_CAN_BUILD_DRIVER_X >> >> config PWM_CAN_BUILD_DRIVER_Y >> defbool ARCH_Y >> select HAS_PWM >> >> config PWM_DRIVER_Y >> tristate "PWM chip Y support" >> depends on PWM && PWM_CAN_BUILD_DRIVER_Y > > What selects the 'PWM_CAN_BUILD_DRIVER_FOO'? > Its def_bool statement, which lists the prerequisites to build the driver. E.g. for a I2C PWM expander I2S support, for a on-SoC PWM core support for the SoC family, etc.. So it will be true if the driver can actually be built and false otherwise. If one of the PWM_CAN_BUILD_DRIVER_FOO symbols is true also HAS_PWM will be true and PWM becomes selectable. But it seems to be a bid tedious to have these extra lines for each driver and I guess it is not a PWM subsystem specific issue. There are other subsystems where this probably applies as well, e.g. the MFD subsystem. Also such a solution would rule out out-of-tree PWM driver modules, since it is not possible to get CONFIG_PWM selected. - Lars