From: Alexandre Courbot <gnurou@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
Alexandre Courbot <acourbot@nvidia.com>,
Enric Balletbo i Serra <eballetbo@gmail.com>,
Grant Likely <grant.likely@linaro.org>,
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
Santosh Shilimkar <santosh.shilimkar@ti.com>,
Stephen Warren <swarren@wwwdotorg.org>
Subject: Re: [PATCH 1/2] gpio: add API to be strict about GPIO IRQ usage
Date: Fri, 11 Oct 2013 09:57:07 -0700 [thread overview]
Message-ID: <CAAVeFuLqWTciAkEq+D_8c3e3_UH91djQPVO9CnEMwWogkgxEwA@mail.gmail.com> (raw)
In-Reply-To: <1381483935-12165-1-git-send-email-linus.walleij@linaro.org>
On Fri, Oct 11, 2013 at 2:32 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> It is currently often possible in many GPIO drivers to request
> a GPIO line to be used as IRQ after calling gpio_to_irq() and,
> as the gpiolib is not aware of this, set the same line to
> output and start driving it, with undesired side effects.
>
> As it is a bogus usage scenario to request a line flagged as
> output to used as IRQ, we introduce APIs to let gpiolib track
> the use of a line as IRQ, and also set this flag from the
> userspace ABI.
>
> The API is symmetric so that lines can also be flagged from
> .irq_enable() and unflagged from IRQ by .irq_disable().
> The debugfs file is altered so that we see if a line is
> reserved for IRQ.
A much-welcome safety measure.
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
next prev parent reply other threads:[~2013-10-11 16:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-11 9:32 [PATCH 1/2] gpio: add API to be strict about GPIO IRQ usage Linus Walleij
2013-10-11 16:57 ` Alexandre Courbot [this message]
2013-10-11 19:16 ` Stephen Warren
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=CAAVeFuLqWTciAkEq+D_8c3e3_UH91djQPVO9CnEMwWogkgxEwA@mail.gmail.com \
--to=gnurou@gmail.com \
--cc=acourbot@nvidia.com \
--cc=eballetbo@gmail.com \
--cc=grant.likely@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=plagnioj@jcrosoft.com \
--cc=santosh.shilimkar@ti.com \
--cc=swarren@wwwdotorg.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 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).