linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Lee Jones <lee.jones@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-clk <linux-clk@vger.kernel.org>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	linux-usb@vger.kernel.org
Subject: Re: [RFC PATCH] drivers: use 'depends on MFD_SYSCON' instead of 'select MFD_SYSCON'
Date: Tue, 27 Feb 2018 14:39:11 +0100	[thread overview]
Message-ID: <CAK8P3a2t9a=qzSpxSQ7j5r20i_cR2G=kAZE9amT2fFypU0whzw@mail.gmail.com> (raw)
In-Reply-To: <CAK7LNASOzMdk_ej-U_T3_m-OtseJUOs+TqUv-BqZFLvS3e0kww@mail.gmail.com>

On Tue, Feb 27, 2018 at 11:22 AM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> 2018-02-27 18:03 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
>> On Tue, Feb 27, 2018 at 1:46 AM, Masahiro Yamada
>> <yamada.masahiro@socionext.com> 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

      reply	other threads:[~2018-02-27 13:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-24 14:50 [RFC PATCH] drivers: use 'depends on MFD_SYSCON' instead of 'select MFD_SYSCON' Masahiro Yamada
2018-02-25 12:13 ` Andy Shevchenko
2018-02-26  8:43 ` Arnd Bergmann
2018-02-26 11:53   ` Masahiro Yamada
2018-02-26 12:43     ` Arnd Bergmann
2018-02-27  0:46       ` Masahiro Yamada
2018-02-27  9:03         ` Arnd Bergmann
2018-02-27 10:22           ` Masahiro Yamada
2018-02-27 13:39             ` Arnd Bergmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK8P3a2t9a=qzSpxSQ7j5r20i_cR2G=kAZE9amT2fFypU0whzw@mail.gmail.com' \
    --to=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).