From: Andreas Fenkart <andreas.fenkart@streamunlimited.com>
To: Felipe Balbi <balbi@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>,
Andreas Fenkart <andreas.fenkart@streamunlimited.com>,
jon-hunter@ti.com, khilman@deeprootsystems.com,
grant.likely@secretlab.ca, linus.walleij@linaro.org,
linux-omap@vger.kernel.org, daniel@zonque.org
Subject: Re: [PATCH] gpio/omap: implement irq_enable/disable using mask/unmask.
Date: Fri, 19 Apr 2013 21:25:25 +0200 [thread overview]
Message-ID: <20130419192525.GA30345@blumentopf> (raw)
In-Reply-To: <20130412110701.GF7361@arwen.pp.htv.fi>
Hi Felipe,
On Fri, Apr 12, 2013 at 02:07:01PM +0300, Felipe Balbi wrote:
[snip]
> > > Signed-off-by: Andreas Fenkart <andreas.fenkart@streamunlimited.com>
> > > ---
> > Patch is incomplete and still confusing ;-) if some one reads the
> > patch without the thread. I think you have already ask the question/
> > suggestion in past but its better to split masking/disabling functions
> > and make them behave properly. Mapping enable/disable to mask/unmask
> > to get around the issue seems more of a hack.
>
> right, specially since IRQ susystem will already do that for
> irq_enable():
>
> kernel/irq/chip.c::irq_enable()
>
> 192 void irq_enable(struct irq_desc *desc)
> 193 {
> 194 irq_state_clr_disabled(desc);
> 195 if (desc->irq_data.chip->irq_enable)
> 196 desc->irq_data.chip->irq_enable(&desc->irq_data);
> 197 else
> 198 desc->irq_data.chip->irq_unmask(&desc->irq_data);
> 199 irq_state_clr_masked(desc);
> 200 }
>
> In fact this patch shouldn't be necessary if only IRQ subsystem would do
> the same for irq_disable() (though it doesn't and I haven't fully read
> the code you to understand why, however there's definitely a reason):
>
> 202 void irq_disable(struct irq_desc *desc)
> 203 {
> 204 irq_state_set_disabled(desc);
> 205 if (desc->irq_data.chip->irq_disable) {
> 206 desc->irq_data.chip->irq_disable(&desc->irq_data);
> 207 irq_state_set_masked(desc);
> 208 }
> 209 }
I started some other thread over here:
[PATCH] genirq: use irq_mask as fallback for irq_disable.
https://lkml.org/lkml/2013/4/19/229
/Andi
next prev parent reply other threads:[~2013-04-19 19:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-12 9:13 [PATCH v2] gpio/omap: implement irq_enable/disable using mask/unmask Andreas Fenkart
2013-04-12 9:13 ` [PATCH] " Andreas Fenkart
2013-04-12 10:19 ` Santosh Shilimkar
2013-04-12 11:07 ` Felipe Balbi
2013-04-19 19:25 ` Andreas Fenkart [this message]
2013-04-19 19:20 ` [PATCH v2] gpio/omap: implement irq mask/disable with proper semantic Andreas Fenkart
2013-04-20 12:35 ` Santosh Shilimkar
2013-04-22 8:54 ` [PATCH v3] gpio/omap: implement irq mask/disable with proper Andreas Fenkart
2013-04-22 8:54 ` [PATCH v3] gpio/omap: implement irq mask/disable with proper semantic Andreas Fenkart
2013-04-23 23:38 ` Kevin Hilman
2013-04-25 19:30 ` Jon Hunter
2013-04-25 19:40 ` Jon Hunter
2013-04-26 15:46 ` Jon Hunter
2013-04-26 7:56 ` [PATCH v2] " Linus Walleij
-- strict thread matches above, loose matches on Subject: below --
2012-12-17 9:27 [PATCH] gpio/omap: implement irq_enable/disable using mask/unmask Andreas Fenkart
2012-12-20 5:59 ` Santosh Shilimkar
2012-12-20 16:16 ` Jon Hunter
2013-03-25 22:24 ` Andreas Fenkart
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=20130419192525.GA30345@blumentopf \
--to=andreas.fenkart@streamunlimited.com \
--cc=balbi@ti.com \
--cc=daniel@zonque.org \
--cc=grant.likely@secretlab.ca \
--cc=jon-hunter@ti.com \
--cc=khilman@deeprootsystems.com \
--cc=linus.walleij@linaro.org \
--cc=linux-omap@vger.kernel.org \
--cc=santosh.shilimkar@ti.com \
/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).