All of lore.kernel.org
 help / color / mirror / Atom feed
From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8 05/12] gpio: pl061: bind pinctrl by gpio request
Date: Thu, 14 Feb 2013 16:29:00 +0100	[thread overview]
Message-ID: <CACRpkdb+S7s42dq1q872p6sMw8rPaPRS8NxGMDFBeht0BbYtMQ@mail.gmail.com> (raw)
In-Reply-To: <1360602659-4774-6-git-send-email-haojian.zhuang@linaro.org>

On Mon, Feb 11, 2013 at 6:10 PM, Haojian Zhuang
<haojian.zhuang@linaro.org> wrote:

> Add the pl061_gpio_request() to request pinctrl. Create the logic
> between pl061 gpio driver and pinctrl (pinctrl-single) driver.
>
> While a gpio pin is requested, it will request pinctrl driver to
> set that pin with gpio function mode. So pinctrl driver should
> append .gpio_request_enable() in pinmux_ops.
>
> Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
(...)
> +static int pl061_gpio_request(struct gpio_chip *chip, unsigned offset)
> +{
> +       /*
> +        * Map back to global GPIO space and request muxing, the direction
> +        * parameter does not matter for this controller.
> +        */
> +       int gpio = chip->base + offset;
> +
> +       return pinctrl_request_gpio(gpio);
> +}

So this will work find if the platform supports pinctrl, and either the
pin controller can do something with this, or (after the other patch)
if the GPIO is in some range, but not handled by some
pin controller.

But what about the case where there is a pin controller on the
system, but no range matching this pin?

What will happen then? Eternal deferral?

Yours,
Linus Walleij

  reply	other threads:[~2013-02-14 15:29 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-11 17:10 [PATCH v8 00/12] bind pinconf with pinctrl single Haojian Zhuang
2013-02-11 17:10 ` [PATCH v8 01/12] gpio: add gpio offset in gpio range cells property Haojian Zhuang
2013-02-13 13:33   ` Linus Walleij
2013-02-11 17:10 ` [PATCH v8 02/12] gpio: fix wrong checking condition for gpio range Haojian Zhuang
2013-02-14 12:15   ` Linus Walleij
2013-02-11 17:10 ` [PATCH v8 03/12] gpio: pl061: allocate irq dynamically Haojian Zhuang
2013-02-14 14:04   ` Linus Walleij
2013-02-14 17:10     ` Haojian Zhuang
2013-02-11 17:10 ` [PATCH v8 04/12] pinctrl: verify whether gpio chip overlapps range Haojian Zhuang
2013-02-14 15:23   ` Linus Walleij
2013-02-14 17:01     ` Haojian Zhuang
2013-02-15  9:06       ` Linus Walleij
2013-02-17  9:42         ` Haojian Zhuang
2013-02-11 17:10 ` [PATCH v8 05/12] gpio: pl061: bind pinctrl by gpio request Haojian Zhuang
2013-02-14 15:29   ` Linus Walleij [this message]
2013-02-14 17:06     ` Haojian Zhuang
2013-02-11 17:10 ` [PATCH v8 06/12] pinctrl: single: create new gpio function range Haojian Zhuang
2013-02-13 18:39   ` Tony Lindgren
2013-02-17 10:00     ` Haojian Zhuang
2013-02-14 15:24   ` Linus Walleij
2013-02-14 16:25     ` Haojian Zhuang
2013-02-11 17:10 ` [PATCH v8 07/12] pinctrl: generic: dump pin configuration Haojian Zhuang
2013-02-11 17:10 ` [PATCH v8 08/12] pinctrl: single: set function mask as optional Haojian Zhuang
2013-02-13 18:40   ` Tony Lindgren
2013-02-11 17:10 ` [PATCH v8 09/12] pinctrl: generic: add auto pull config parameter Haojian Zhuang
2013-02-13 23:40   ` Tony Lindgren
2013-02-15  8:54   ` Linus Walleij
2013-02-15 16:37     ` Tony Lindgren
2013-02-15 20:55       ` Linus Walleij
2013-02-15 21:06         ` Tony Lindgren
2013-02-11 17:10 ` [PATCH v8 10/12] pinctrl: generic: rename input schmitt disable Haojian Zhuang
2013-02-13 23:41   ` Tony Lindgren
2013-02-11 17:10 ` [PATCH v8 11/12] pinctrl: single: support generic pinconf Haojian Zhuang
2013-02-13 23:50   ` Tony Lindgren
2013-02-11 17:10 ` [PATCH v8 12/12] document: devicetree: bind pinconf with pin single Haojian Zhuang
2013-02-13 23:51   ` Tony Lindgren
2013-02-15  9:11 ` [PATCH v8 00/12] bind pinconf with pinctrl single 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=CACRpkdb+S7s42dq1q872p6sMw8rPaPRS8NxGMDFBeht0BbYtMQ@mail.gmail.com \
    --to=linus.walleij@linaro.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.