Re: [Letux-kernel] [PATCH] misc: Kconfig: fix missing tristate prompt and add help for LIS3LV02D

From: H. Nikolaus Schaller
Date: Wed Aug 02 2017 - 14:57:22 EST



> Am 02.08.2017 um 18:13 schrieb H. Nikolaus Schaller <hns@xxxxxxxxxxxxx>:
>
> Hi,
>
>> Am 02.08.2017 um 18:06 schrieb Arnd Bergmann <arnd@xxxxxxxx>:
>>
>> On Wed, Aug 2, 2017 at 5:57 PM, Greg Kroah-Hartman
>> <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>>> On Wed, Aug 02, 2017 at 04:05:36PM +0200, H. Nikolaus Schaller wrote:
>>>> + help
>>>> + If you say yes here, you get support for the STM
>>>> + LIS3LV02D sensor.
>>>
>>> No name for what the module is called?
>>
>> Not sure if that's even relevant here, as the symbol only controls the
>> base driver that doesn't do anything by itself, while the LIS3_SPI/LIS3_I2C
>> Kconfig symbols are the interesting ones.
>>
>> The help text should also reflect that I think and explain why you would
>> enable the symbol in the first place (which the patch description doesn't
>> either).
>
> Hm. I start to no longer understand how this LIS302 is configured at all
> and what SENSORS_LIS3LV02D is good for.
>
> I just noticed while preparing some other driver/misc that there is no
> description in the drivers/misc/Kconfig file while all other CONFIGs have some.
>
> But configuring LIS302 works (we have some GTA04 boards where one is installed).

Ok, I got it.

The config SENSORS_LIS3LV02D is like a temporary variable to build and link
the lis3lv02d.o core if either SPI or I2C is enabled.

And there is a not very obvious feature that if there is no tristate prompt,
the whole variable is hidden. Quite confusing but correct and therefore we should
not add one. And if it is not shown, we do not need a help.

If we apply my proposed patch, the variable becomes separately configurable and
you can e.g. set SENSORS_LIS3LV02D=m and CONFIG_SENSORS_LIS3_I2C=y which confuses
the linker.

So we should leave it as it is and ignore this patch.

BR and thanks for enlightening me,
Nikolaus