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 RFC v2 2/2] pinctrl: add pinctrl gpio binding support
Date: Mon, 21 May 2012 11:11:25 -0600	[thread overview]
Message-ID: <4FBA773D.4050200@wwwdotorg.org> (raw)
In-Reply-To: <20120521123929.GA27055@shlinux2.ap.freescale.net>

On 05/21/2012 06:39 AM, Dong Aisheng wrote:
> On Sat, May 19, 2012 at 04:05:46AM +0800, Stephen Warren wrote:
>> On 05/18/2012 07:12 AM, Dong Aisheng wrote:
>>> The gpio ranges standard dt binding format is
>>> <&gpio $gpio_offset $pin_offset $npin>
>>>
>>> The core will parse and register the pinctrl gpio ranges
>>> from device tree.
...
>> Do you need to xxx_get(ranges[i].gc) to prevent it going away, and put()
>> it when removing the ranges?
>
> How would you suggest to implement xxx_get(ranges[i].gc)?
> Since the parameter is a struct gpiochip, my first sense is that it may be
> provided by gpio subsystem, but i did not find such a function.
> Looking at gpio subsystem, i also can't see it should provide such function.
> 
> I wonder if we need to implement it, if gpiochip is gone way,
> the error will be detected in the higher gpio layer and will not pass
> down to pinctrl.

Yes, it looks like we should add new APIs for this; we need to
try_module_get() on the module containing the GPIO chip so it doesn't
disappear, similar to what gpio_request() does.

WARNING: multiple messages have this Message-ID (diff)
From: Stephen Warren <swarren@wwwdotorg.org>
To: Dong Aisheng <aisheng.dong@freescale.com>
Cc: Dong Aisheng-B29396 <B29396@freescale.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linus.walleij@stericsson.com" <linus.walleij@stericsson.com>
Subject: Re: [PATCH RFC v2 2/2] pinctrl: add pinctrl gpio binding support
Date: Mon, 21 May 2012 11:11:25 -0600	[thread overview]
Message-ID: <4FBA773D.4050200@wwwdotorg.org> (raw)
In-Reply-To: <20120521123929.GA27055@shlinux2.ap.freescale.net>

On 05/21/2012 06:39 AM, Dong Aisheng wrote:
> On Sat, May 19, 2012 at 04:05:46AM +0800, Stephen Warren wrote:
>> On 05/18/2012 07:12 AM, Dong Aisheng wrote:
>>> The gpio ranges standard dt binding format is
>>> <&gpio $gpio_offset $pin_offset $npin>
>>>
>>> The core will parse and register the pinctrl gpio ranges
>>> from device tree.
...
>> Do you need to xxx_get(ranges[i].gc) to prevent it going away, and put()
>> it when removing the ranges?
>
> How would you suggest to implement xxx_get(ranges[i].gc)?
> Since the parameter is a struct gpiochip, my first sense is that it may be
> provided by gpio subsystem, but i did not find such a function.
> Looking at gpio subsystem, i also can't see it should provide such function.
> 
> I wonder if we need to implement it, if gpiochip is gone way,
> the error will be detected in the higher gpio layer and will not pass
> down to pinctrl.

Yes, it looks like we should add new APIs for this; we need to
try_module_get() on the module containing the GPIO chip so it doesn't
disappear, similar to what gpio_request() does.

  parent reply	other threads:[~2012-05-21 17:11 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18 13:12 [PATCH RFC v2 1/2] pinctrl: add pinctrl_add_gpio_ranges function Dong Aisheng
2012-05-18 13:12 ` Dong Aisheng
2012-05-18 13:12 ` [PATCH RFC v2 2/2] pinctrl: add pinctrl gpio binding support Dong Aisheng
2012-05-18 13:12   ` Dong Aisheng
2012-05-18 20:05   ` Stephen Warren
2012-05-18 20:05     ` Stephen Warren
2012-05-21 12:39     ` Dong Aisheng
2012-05-21 12:39       ` Dong Aisheng
2012-05-21 17:09       ` Stephen Warren
2012-05-21 17:09         ` Stephen Warren
2012-05-22  1:00         ` Dong Aisheng
2012-05-22  1:00           ` Dong Aisheng
2012-05-21 17:11       ` Stephen Warren [this message]
2012-05-21 17:11         ` Stephen Warren
2012-05-22  1:12         ` Dong Aisheng
2012-05-22  1:12           ` Dong Aisheng
2012-05-22  3:35     ` Dong Aisheng
2012-05-22  3:35       ` Dong Aisheng
2012-05-22 17:12       ` Stephen Warren
2012-05-22 17:12         ` Stephen Warren
2012-05-18 19:51 ` [PATCH RFC v2 1/2] pinctrl: add pinctrl_add_gpio_ranges function Stephen Warren
2012-05-18 19:51   ` Stephen Warren
2012-05-24 14:29 ` Linus Walleij
2012-05-24 14:29   ` Linus Walleij
2012-05-24 14:55   ` Linus Walleij
2012-05-24 14:55     ` 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=4FBA773D.4050200@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.