linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: haojian.zhuang@gmail.com (Haojian Zhuang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] mfd: update irq handler in max8925
Date: Tue, 26 Jan 2010 06:31:56 -0500	[thread overview]
Message-ID: <771cded01001260331u541cc931x361d0719cd8fe00@mail.gmail.com> (raw)
In-Reply-To: <20100126112800.GL15759@rakim.wolfsonmicro.main>

On Tue, Jan 26, 2010 at 6:28 AM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Mon, Jan 25, 2010 at 10:12:39PM -0500, Haojian Zhuang wrote:
>> On Mon, Jan 25, 2010 at 6:59 AM, Mark Brown
>> > On Mon, Jan 25, 2010 at 06:08:19AM -0500, Haojian Zhuang wrote:
>
>> >> + ? ? ? ? ? ? else if (value & irq_data->offs) {
>> >> + ? ? ? ? ? ? ? ? ? ? dev_err(chip->dev, "Noboday cares IRQ #%d. Mask it\n",
>> >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? chip->irq_base + i);
>> >> + ? ? ? ? ? ? ? ? ? ? max8925_set_bits(i2c, irq_data->mask_reg,
>> >> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? irq_data->offs, irq_data->offs);
>
>> > genirq ought to be handling this for you?
>
>> No, genirq doesn't know this. I let the thread_fn to take this job.
>
> This suggests that something is wrong somewhere else - genirq will
> normally warn if an interrupt is reported without being handled which
> looks like what this code is trying to achieve. ?Looking at the patch
> I expect you should just be able to drop the test you're doing
> immediately before the quoted code to see if the interrupt is enabled
> and call handle_nested_irq() unconditionally, genirq should generate a
> warning and mask the IRQ if it's not handled which is what your code
> here is doing.
>
Actually I can't find genirq reports any warning. I only find my code
reports warning message.

>> >> + * clear_irq: operation on clearing status of nIRQ pin in platform
>> >> + * clear_tsc_irq: operation on clearing status of nTIRQ pin in platform
>> >> + */
>
>> > Shouldn't these also be handled by genirq as functions of the interrupt
>> > controller that the chip is chained from?
>
>> Because PMIC IRQ is connected to the special pin of CPU. CPU needs to
>> clear pin status in external. genirq shouldn't take care on it. I have
>> to use this ugly way to clear pin status.
>
> I would expect this to be handled by the special pin on the CPU being an
> irq_chip, or by having the existing interrupt controller handle this pin
> properly. ?The need to ack is going to be there for anything that ends
> up hanging off this special IRQ, isn't it?
>
Em. it's OK. I'll do it.

  reply	other threads:[~2010-01-26 11:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-25 11:08 [PATCH 2/4] mfd: update irq handler in max8925 Haojian Zhuang
2010-01-25 11:59 ` Mark Brown
2010-01-26  3:12   ` Haojian Zhuang
2010-01-26  3:14     ` Haojian Zhuang
2010-01-26 11:28     ` Mark Brown
2010-01-26 11:31       ` Haojian Zhuang [this message]
2010-01-26 12:06         ` Mark Brown
2010-01-27  6:02           ` Haojian Zhuang
2010-01-27 11:12             ` Mark Brown

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=771cded01001260331u541cc931x361d0719cd8fe00@mail.gmail.com \
    --to=haojian.zhuang@gmail.com \
    --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 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).