linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Andrew Bresticker <abrestic@chromium.org>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: tegra1x4: initialize at arch_initcall time
Date: Mon, 13 Jan 2014 10:02:39 -0700	[thread overview]
Message-ID: <52D41C2F.3050308@wwwdotorg.org> (raw)
In-Reply-To: <1389401416-29892-1-git-send-email-abrestic@chromium.org>

On 01/10/2014 05:50 PM, Andrew Bresticker wrote:
> Many devices rely on pinctrl/pinmux settings being applied
> before probing and some of these may probe before device_initcall
> time (e.g. i2c at subsys_initcall).  Move Tegra1x4 pinctrl driver
> registration to arch_initcall time so that proper pin settings
> can be applied earlier.

NAK. We shouldn't play games with initcall levels to achieve probe
ordering. It's not scalable and there's no actual guarantee it'll
produce the desired result.

Instead, if one device depends on another, it should do so explicitly.
In other words, the device that relies on a particular pinctrl setting
should have a pinctrl state defined, that references the pin controller,
which then triggers deferred probe until the pin controller is initialized.

Since we initialize the whole pinctrl setup in one go in a state
associated with the pin controller, rather than as separate states
associated with each device, you'll need to have the leaf devices
reference an empty pinctrl state defined in the desired pin controller.

      parent reply	other threads:[~2014-01-13 17:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-11  0:50 [PATCH] pinctrl: tegra1x4: initialize at arch_initcall time Andrew Bresticker
     [not found] ` <1389401416-29892-1-git-send-email-abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-01-13  9:02   ` Thierry Reding
     [not found]     ` <20140113090223.GA16296-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2014-01-13 17:03       ` Stephen Warren
2014-01-13 17:02 ` Stephen Warren [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=52D41C2F.3050308@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=abrestic@chromium.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@gmail.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).