mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shawn Guo <shawn.guo@freescale.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>,
	Dong Aisheng <b29396@freescale.com>,
	<linus.walleij@stericsson.com>, <linux-kernel@vger.kernel.org>,
	<rob.herring@calxeda.com>, <grant.likely@secretlab.ca>,
	<linux-arm-kernel@lists.infradead.org>, <kernel@pengutronix.de>
Subject: Re: [RFC PATCH v2 4/4] mmc: sdhci-esdhc-imx: using pinmux subsystem
Date: Thu, 15 Dec 2011 15:05:08 +0800	[thread overview]
Message-ID: <20111215070505.GA22541@S2101-09.ap.freescale.net> (raw)
In-Reply-To: <CACRpkdYHtgx3Qgx4QRdgOahQXjvSWE_iogWCZjaYQ-VnyS62uQ@mail.gmail.com>

On Wed, Dec 14, 2011 at 11:15:53PM +0100, Linus Walleij wrote:
> On Wed, Dec 14, 2011 at 10:11 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> > On Thu, Dec 15, 2011 at 12:03:42AM +0800, Dong Aisheng wrote:
> 
> >> +     pmx = pinmux_get(&pdev->dev, NULL);
> >> +     if (IS_ERR(pmx)) {
> >> +             err = PTR_ERR(pmx);
> >> +             goto err_pmx_get;
> >> +     }
> >> +     err = pinmux_enable(pmx);
> >> +     if (err)
> >> +             goto err_pmx_enable;
> >> +     imx_data->pmx = pmx;
> >> +
> >
> > Won't this break every i.MX except i.MX6?
> 
It will not if we do not compile other imx together with imx6, because
there are a set of empty functions defined in
include/linux/pinctrl/pinmux.h for those builds without pinctrl enabled.
But yes, it's actually broken since we are on the way to compile imx3,
imx5 and imx6 as single image.

> Not this patch on its own, first the machines have to
> select PINCTRL
> select PINMUX_FOO
> 
> *Then* it will break :-D
> 
> So if you want to do this for i.MX you need something like
> selectable dummy pinmuxes, i.e. pinmux_get() to return something
> that just say "OK" to everything like the dummy regulators.
> 
> Shall I try to create something like that?
> 
Isn't the empty functions defined in include/linux/pinctrl/pinmux.h
for this purpose?  It does not solve the problem with single image.
You might probably mean that we create a dummy_pinctrl_desc and register
it to pinctrl core with pinctrl_register() if we detect that the kernel
is running on a soc that has no pinctrl support?

This is not a problem to pinctrl migration only.  We have the same
problem with common clk migration.  Unless we migrate imx3, imx5 and
imx6 to common clk at the same time, single image build just does not
cope with clk_* api.

-- 
Regards,
Shawn


  reply	other threads:[~2011-12-15  6:56 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-14 16:03 [RFC PATCH v2 0/4] pinctrl: imx: add pinnmux support Dong Aisheng
2011-12-14 16:03 ` [RFC PATCH v2 1/4] dt: add of_get_child_number helper function Dong Aisheng
2011-12-14 18:04   ` Rob Herring
2011-12-14 21:41     ` Grant Likely
2011-12-15  5:49       ` Dong Aisheng-B29396
2011-12-14 16:03 ` [RFC PATCH v2 2/4] pinctrl: imx: add pinmux imx driver Dong Aisheng
2011-12-14 16:01   ` Fabio Estevam
2011-12-15  5:48     ` Dong Aisheng-B29396
2011-12-14 18:00   ` Linus Walleij
2011-12-14 21:47     ` Grant Likely
2011-12-15  7:38       ` Dong Aisheng-B29396
2011-12-15  7:35     ` Dong Aisheng-B29396
2011-12-15  8:18   ` Shawn Guo
2011-12-15  8:16     ` Dong Aisheng-B29396
2011-12-14 16:03 ` [RFC PATCH v2 3/4] ARM: imx6q: using pinmux subsystem Dong Aisheng
2011-12-14 18:02   ` Linus Walleij
2011-12-15  7:36     ` Dong Aisheng-B29396
2011-12-14 16:03 ` [RFC PATCH v2 4/4] mmc: sdhci-esdhc-imx: " Dong Aisheng
2011-12-14 17:46   ` Linus Walleij
2011-12-14 21:11   ` Sascha Hauer
2011-12-14 22:15     ` Linus Walleij
2011-12-15  7:05       ` Shawn Guo [this message]
2011-12-15  8:26         ` Linus Walleij
2011-12-15  8:59           ` Dong Aisheng-B29396
2011-12-15  9:33             ` Sascha Hauer
2011-12-15 11:21               ` Shawn Guo
2011-12-15 11:28                 ` Dong Aisheng-B29396
2011-12-15 11:53                   ` Shawn Guo
2011-12-15 11:54                     ` Sascha Hauer
2011-12-15 12:17                       ` Shawn Guo
2011-12-15 13:23                         ` Sascha Hauer
2011-12-15 14:00                           ` Shawn Guo
2011-12-15 16:34                             ` Sascha Hauer
2011-12-15  9:03           ` Shawn Guo
2011-12-15  7:23       ` Dong Aisheng-B29396
2011-12-15  8:28         ` Linus Walleij
2011-12-15  8:55           ` Dong Aisheng-B29396
2011-12-15  9:32         ` Sascha Hauer
2011-12-15 10:40           ` Dong Aisheng-B29396
2011-12-14 17:40 ` [RFC PATCH v2 0/4] pinctrl: imx: add pinnmux support Linus Walleij

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=20111215070505.GA22541@S2101-09.ap.freescale.net \
    --to=shawn.guo@freescale.com \
    --cc=b29396@freescale.com \
    --cc=grant.likely@secretlab.ca \
    --cc=kernel@pengutronix.de \
    --cc=linus.walleij@linaro.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=s.hauer@pengutronix.de \
    /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

all inboxes | Powered by JetHome®