From: Baruch Siach <baruch@tkos.co.il>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org,
Alexandre Courbot <acourbot@nvidia.com>,
Haojian Zhuang <haojian.zhuang@linaro.org>,
Deepak Sikri <deepak.sikri@st.com>
Subject: Re: [PATCH 1/3] gpio: pl061: lock IRQs when starting them
Date: Wed, 27 Nov 2013 06:20:19 +0200 [thread overview]
Message-ID: <20131127042019.GV32436@tarshish> (raw)
In-Reply-To: <1385472227-25956-1-git-send-email-linus.walleij@linaro.org>
Hi Linus,
On Tue, Nov 26, 2013 at 02:23:47PM +0100, Linus Walleij wrote:
> This uses the new API for tagging GPIO lines as in use by
> IRQs. This enforces a few semantic checks on how the underlying
> GPIO line is used.
>
> Cc: Haojian Zhuang <haojian.zhuang@linaro.org>
> Cc: Baruch Siach <baruch@tkos.co.il>
> Cc: Deepak Sikri <deepak.sikri@st.com>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> drivers/gpio/gpio-pl061.c | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
> index f22f7f3e2e53..1c37c97acc76 100644
> --- a/drivers/gpio/gpio-pl061.c
> +++ b/drivers/gpio/gpio-pl061.c
> @@ -231,11 +231,33 @@ static void pl061_irq_unmask(struct irq_data *d)
> spin_unlock(&chip->lock);
> }
>
> +static unsigned int pl061_irq_startup(struct irq_data *d)
> +{
> + struct pl061_gpio *chip = irq_data_get_irq_chip_data(d);
> +
> + if (gpio_lock_as_irq(&chip->gc, irqd_to_hwirq(d)))
> + dev_err(chip->gc.dev,
> + "unable to lock HW IRQ %lu for IRQ\n",
> + irqd_to_hwirq(d));
What is this locking good for if locking is not enforced (i.e. error out)?
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
next prev parent reply other threads:[~2013-11-27 4:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-26 13:23 [PATCH 1/3] gpio: pl061: lock IRQs when starting them Linus Walleij
2013-11-27 4:20 ` Baruch Siach [this message]
2013-11-27 7:58 ` Linus Walleij
2013-11-27 8:02 ` Baruch Siach
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=20131127042019.GV32436@tarshish \
--to=baruch@tkos.co.il \
--cc=acourbot@nvidia.com \
--cc=deepak.sikri@st.com \
--cc=haojian.zhuang@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.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).