Re: awful kconfig help texts.

From: Lars-Peter Clausen
Date: Wed Aug 01 2012 - 09:14:43 EST


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/