Re: [RFC PATCH] drivers: use 'depends on MFD_SYSCON' instead of 'select MFD_SYSCON'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 27, 2018 at 11:22 AM, Masahiro Yamada
<yamada.masahiro@xxxxxxxxxxxxx> wrote:
> 2018-02-27 18:03 GMT+09:00 Arnd Bergmann <arnd@xxxxxxxx>:
>> On Tue, Feb 27, 2018 at 1:46 AM, Masahiro Yamada
>> <yamada.masahiro@xxxxxxxxxxxxx> wrote:
>>> But, we need to decide what the right solution is.
>>
>> I think for consistency, we should change the existing
>> 'depends on MFD_SYSCON' to 'select MFD_SYSCON'. This
>> matches what we do with REGMAP_MMIO.
>>
>> MFD_SYSCON is really a thin wrapper around REGMAP_MMIO,
>> so I would keep using the same conventions here, even though
>> we normally prefer to not 'select' any user-visible options.
>>
>> It might be possible to make MFD_SYSCON a silent symbol
>> as well, but we'd have to make sure that all users select the symbol
>> then.
>>
>>         Arnd
>
>
> If we agree, I can send the following three patches.
>
>
> [1] Add "depends on HAS_IOMEM"
>     to all drivers selecting MFD_SYSCON
>     (Unmet dependencies will be fixed by this)
>
> [2] For consistency, convert existing "depends on MFD_SYSCON"
>     to "select MFD_SYSCON" + "depends on HAS_IOMEM"

Those sound good.

> [3] Change MFD_SYSCON to user-unconfigurable option.
>     But, for COMPILE_TEST, allow users to enable it independently.
>     Like follows:
>
>     config MFD_SYSCON
>         bool "System Controller Register R/W Based on Regmap" if COMPILE_TEST
>         select REGMAP_MMIO
>         help
>           Select this option to enable accessing system control registers
>           via regmap.
>
>
> Is this OK?

I'm unsure about the third one, since we have drivers that can optionally
use syscon, depending on the platform. With this change, any user that
manually enabled syscon to use that with a driver that requires it on their
platform but not on others will see a regression.

If we do make MFD_SYSCON a silent option like that, we should remove
the #else section in include/linux/mfd/syscon.h to force a build error,
and require all drivers to 'select MFD_SYSCON' if they are able to use it.

       Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux