From: "Jon Smirl" <jonsmirl@gmail.com>
To: "Kumar Gala" <galak@kernel.crashing.org>
Cc: PowerPC dev list <Linuxppc-dev@ozlabs.org>
Subject: Re: IRQs in i2c-mpc.c
Date: Sat, 10 Nov 2007 18:44:59 -0500 [thread overview]
Message-ID: <9e4733910711101544v178e29cer4e53577c011e89f7@mail.gmail.com> (raw)
In-Reply-To: <A4797E92-9FCF-484A-B6AA-9385913AD465@kernel.crashing.org>
On 11/10/07, Kumar Gala <galak@kernel.crashing.org> wrote:
>
> On Nov 10, 2007, at 5:16 PM, Jon Smirl wrote:
>
> > On 11/10/07, Kumar Gala <galak@kernel.crashing.org> wrote:
> >> Looking at the current driver it looks like we could get ride of if
> >> check since the previous code checked the return of
> >> platform_get_irq().
> >
> > The code was a snippet from the larger patch that is converting i2c
> > from being a platform driver to a of_platform driver.
> >
> > The question is, what to do about a missing IRQ tag in the device tree
> > or a IRQ of zero. What is an error and what should be ignored, etc.
>
> I think the lack of an IRQ in the device tree should be an error. If
> the IRQ value is zero, than its zero.
irq_of_parse_and_map() returns NO_IRQ when the irq parameter is missing.
This API appears to be broken. In asm-powerpc/irq.h NO_IRQ is defined
as (0). There is no way to tell an error in the attribute from a valid
attribute selecting interrupt zero.
NO_IRQ used to be (-1).
/* This number is used when no interrupt has been assigned */
#ifdef CONFIG_PPC_MERGE
#define NO_IRQ (0)
#else
#define NO_IRQ (-1)
--
Jon Smirl
jonsmirl@gmail.com
next prev parent reply other threads:[~2007-11-10 23:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-10 19:44 IRQs in i2c-mpc.c Jon Smirl
2007-11-10 23:09 ` Kumar Gala
2007-11-10 23:16 ` Jon Smirl
2007-11-10 23:18 ` Kumar Gala
2007-11-10 23:44 ` Jon Smirl [this message]
2007-11-11 6:27 ` Benjamin Herrenschmidt
2007-11-11 15:34 ` Jon Smirl
2007-11-11 20:44 ` Benjamin Herrenschmidt
2007-11-11 6:26 ` Benjamin Herrenschmidt
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=9e4733910711101544v178e29cer4e53577c011e89f7@mail.gmail.com \
--to=jonsmirl@gmail.com \
--cc=Linuxppc-dev@ozlabs.org \
--cc=galak@kernel.crashing.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).