All of lore.kernel.org
 help / color / mirror / Atom feed
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] pinctrl: queue GPIO operations instead of defering
Date: Mon, 19 Aug 2013 13:15:42 -0600	[thread overview]
Message-ID: <52126EDE.5060000@wwwdotorg.org> (raw)
In-Reply-To: <1376751410-14560-1-git-send-email-linus.walleij@linaro.org>

On 08/17/2013 08:56 AM, Linus Walleij wrote:
> We currently defer probing of the caller if a pinctrl GPIO
> request or direction setting comes in before the range mapping
> a certain GPIO to a certain pin controller is available.
> 
> This can end up with a circular dependency: the GPIO driver
> needs the pin controller to be ready

So that much is explained above; it's because some GPIO APIs call into
pinctrl to manage GPIO-vs-pinmux-function setup.

> and the pin controller need the GPIO driver to be ready.

Why does that happen?

> This also happens if
> pin controllers and GPIO controllers compiled as modules
> are inserted in a certain order.

Shouldn't deferred probe resolve that just fine, assuming there are no
circular dependencies? In other words, this is just a special case of
the explanation above, so probably not worth explicitly mentioning.

...
> On the Nomadik we get this situation with the pinctrl
> driver when moving to requesting GPIOs off the gpiochip
> right after it has been added,

So, the pinctrl driver calls gpio_request()? Surely the solution is
simply not to do that?

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Stephen Warren <swarren@nvidia.com>,
	Haojian Zhuang <haojian.zhuang@linaro.org>,
	Lars Poeschel <poeschel@lemonage.de>,
	Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Subject: Re: [PATCH v2] pinctrl: queue GPIO operations instead of defering
Date: Mon, 19 Aug 2013 13:15:42 -0600	[thread overview]
Message-ID: <52126EDE.5060000@wwwdotorg.org> (raw)
In-Reply-To: <1376751410-14560-1-git-send-email-linus.walleij@linaro.org>

On 08/17/2013 08:56 AM, Linus Walleij wrote:
> We currently defer probing of the caller if a pinctrl GPIO
> request or direction setting comes in before the range mapping
> a certain GPIO to a certain pin controller is available.
> 
> This can end up with a circular dependency: the GPIO driver
> needs the pin controller to be ready

So that much is explained above; it's because some GPIO APIs call into
pinctrl to manage GPIO-vs-pinmux-function setup.

> and the pin controller need the GPIO driver to be ready.

Why does that happen?

> This also happens if
> pin controllers and GPIO controllers compiled as modules
> are inserted in a certain order.

Shouldn't deferred probe resolve that just fine, assuming there are no
circular dependencies? In other words, this is just a special case of
the explanation above, so probably not worth explicitly mentioning.

...
> On the Nomadik we get this situation with the pinctrl
> driver when moving to requesting GPIOs off the gpiochip
> right after it has been added,

So, the pinctrl driver calls gpio_request()? Surely the solution is
simply not to do that?

  reply	other threads:[~2013-08-19 19:15 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-17 14:56 [PATCH v2] pinctrl: queue GPIO operations instead of defering Linus Walleij
2013-08-17 14:56 ` Linus Walleij
2013-08-19 19:15 ` Stephen Warren [this message]
2013-08-19 19:15   ` Stephen Warren
2013-08-21 23:07   ` Linus Walleij
2013-08-21 23:07     ` Linus Walleij
2013-08-21 23:23     ` Stephen Warren
2013-08-21 23:23       ` Stephen Warren
2013-08-21 23:44       ` Linus Walleij
2013-08-21 23:44         ` Linus Walleij
2013-08-19 19:21 ` Stephen Warren
2013-08-19 19:21   ` Stephen Warren
2013-08-21 17:45   ` Stephen Warren
2013-08-21 17:45     ` Stephen Warren
2013-08-21 23:04     ` Linus Walleij
2013-08-21 23:04       ` 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=52126EDE.5060000@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.