linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Yangbo Lu <yangbo.lu@freescale.com>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	X.Xie@freescale.com, Li Leo <LeoLi@freescale.com>
Subject: Re: [v4, 5/6] mmc: kconfig: select FSL_GUTS for MMC_SDHCI_OF_ESDHC
Date: Mon, 28 Dec 2015 13:03:50 -0600	[thread overview]
Message-ID: <1451329430.18314.149.camel@freescale.com> (raw)
In-Reply-To: <CAPDyKFqbi+3sjkVM2RYijmQ17YTwgCAL0SQjo=CmZX1jMRP4mA@mail.gmail.com>

On Thu, 2015-12-17 at 12:25 +0100, Ulf Hansson wrote:
> On 16 December 2015 at 23:48, Scott Wood <scottwood@freescale.com> wrote:
> > On Tue, 2015-12-15 at 10:46 +0100, Ulf Hansson wrote:
> > > [...]
> > > > > > --- a/drivers/mmc/host/Kconfig
> > > > > > +++ b/drivers/mmc/host/Kconfig
> > > > > > @@ -142,6 +142,8 @@ config MMC_SDHCI_OF_ESDHC
> > > > > >         depends on MMC_SDHCI_PLTFM
> > > > > >         depends on PPC || ARCH_MXC || ARCH_LAYERSCAPE
> > > > > >         select MMC_SDHCI_IO_ACCESSORS
> > > > > > +       select SOC_FSL
> > > > > > +       select FSL_GUTS
> > > > > 
> > > > > This is weird.
> > > > > 
> > > > > First, perhaps it would make sense to have stub functions for those
> > > > > the FSL_GUTS driver provides via its API, thus the above wouldn't be
> > > > > required at all. Of course this makes only sense if you think there
> > > > > are/could be configurations for a cross SOC driver which don't need
> > > > > the GUTS driver.
> > > > > 
> > > > > Second, even if you think the stubs above is a bad idea, I would
> > > > > from
> > > > > the top-level Kconfig for your platform, add the needed "selects" as
> > > > > I
> > > > > think it's where it belongs and then change this to "depends on"
> > > > > instead.
> > > > 
> > > > Why is it weird for a driver to select another driver that it makes
> > > > calls
> > > > to?
> > > >  Much easier to do it here than in all the platforms that use this
> > > > driver.
> > > 
> > > Because using "select" will not consider the dependencies for the new
> > > selected Kconfig option. I can imagine that it might become a problem,
> > > sooner or later.
> > 
> > It's not a problem as long as the selected option's dependencies (if any)
> > are
> > selected, or depended on by the selecting driver.  I wouldn't expect the
> > FSL_GUTS driver to depend on anything other than basic OF support.
> > 
> > > So, "select" shall be used by care and in this case I think we can
> > > cope fine with using "depends on".
> > 
> > What does select exist for if not situations like this?  What "care" is
> > missing?
> > 
> 
> The GUTS driver is SoC specific driver. If/when dependencies are added
> for that driver it will break the usage of the select for the MMC host
> driver. No, thanks it's fragile!
> 
> To me, the best way to use select is either from top-level platform
> Kconfig or where it's better isolated, perhaps within a subsystem.

The guts driver is not going to depend on anything that the esdhc driver
shouldn't already be depending on (why does MMC_SDHCI_OF_ESDHC not currently
depend on OF?) and if the guts driver ever did grow a dependency that isn't
met but it is selected anyway, kconfig will warn.  I realize that growing a
guts dependency list in every user would be bad but I just don't see such
dependencies happening.

-Scott


  reply	other threads:[~2015-12-28 19:04 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14  4:24 [v4, 0/6] eSDHC patches introduction Yangbo Lu
2015-12-14  4:24 ` [v4, 1/6] soc: fsl: add GUTS driver for QorIQ platforms Yangbo Lu
2015-12-14 22:07   ` Scott Wood
2015-12-14  4:24 ` [v4, 2/6] dt: move guts devicetree doc out of powerpc directory Yangbo Lu
2015-12-14 22:10   ` Scott Wood
2015-12-14  4:24 ` [v4, 3/6] powerpc/fsl: move mpc85xx.h to include/linux Yangbo Lu
2015-12-14 22:12   ` Scott Wood
2015-12-14  4:24 ` [v4, 4/6] mmc: sdhci-of-esdhc: get SVR from global utilities registers Yangbo Lu
2015-12-14  4:24 ` [v4, 5/6] mmc: kconfig: select FSL_GUTS for MMC_SDHCI_OF_ESDHC Yangbo Lu
2015-12-14 13:08   ` Ulf Hansson
2015-12-14 18:04     ` Scott Wood
2015-12-15  9:46       ` Ulf Hansson
2015-12-16 22:48         ` Scott Wood
2015-12-17 11:25           ` Ulf Hansson
2015-12-28 19:03             ` Scott Wood [this message]
2015-12-17 11:30         ` Ulf Hansson
2015-12-28 10:26           ` Yangbo Lu
2015-12-28 12:10             ` Ulf Hansson
2015-12-28 19:10               ` Scott Wood
2016-01-06  6:58                 ` Yangbo Lu
     [not found]                   ` <AM3PR04MB530AAF1632EA442F05C95BF91F50@AM3PR04MB530.eurprd04.prod.outlook.com>
     [not found]                     ` <HE1PR04MB0889197B75CA5C8FDB793F87F8F60@HE1PR04MB0889.eurprd04.prod.outlook.com>
2016-01-08  6:34                       ` Scott Wood
2016-01-06  7:34                 ` Yangbo Lu
2016-01-06  7:23               ` Yangbo Lu
2015-12-28 18:47           ` Scott Wood
2016-01-06  7:18             ` Yangbo Lu
2016-01-14 10:31               ` Ulf Hansson
2016-01-08  6:24             ` Yangbo Lu
2015-12-14 22:14   ` Scott Wood
2015-12-14  4:24 ` [v4, 6/6] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0 Yangbo Lu
2015-12-14 12:22 ` [v4, 0/6] eSDHC patches introduction Ulf Hansson

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=1451329430.18314.149.camel@freescale.com \
    --to=scottwood@freescale.com \
    --cc=LeoLi@freescale.com \
    --cc=X.Xie@freescale.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=yangbo.lu@freescale.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).