Re: IRQs in i2c-mpc.c

2007-11-11 Thread Benjamin Herrenschmidt
> Is the only error return from irq_of_parse_and_map() NO_IRQ? or can we > get standard negative returns? I started tracing out the returns from > irq_of_parse_and_map() but there are a lot of them. NP_IRQ is the only error return. Ben. ___ Linuxppc-

Re: IRQs in i2c-mpc.c

2007-11-11 Thread Jon Smirl
On 11/11/07, Benjamin Herrenschmidt <[EMAIL PROTECTED]> wrote: > > > 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 > >

Re: IRQs in i2c-mpc.c

2007-11-10 Thread Benjamin Herrenschmidt
> 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, it is not broken. Interrupt numb

Re: IRQs in i2c-mpc.c

2007-11-10 Thread Benjamin Herrenschmidt
On Sat, 2007-11-10 at 17:18 -0600, Kumar Gala wrote: > On Nov 10, 2007, at 5:16 PM, Jon Smirl wrote: > > > On 11/10/07, Kumar Gala <[EMAIL PROTECTED]> wrote: > >> Looking at the current driver it looks like we could get ride of if > >> check since the previous code checked the return of > >> pl

Re: IRQs in i2c-mpc.c

2007-11-10 Thread Jon Smirl
On 11/10/07, Kumar Gala <[EMAIL PROTECTED]> wrote: > > On Nov 10, 2007, at 5:16 PM, Jon Smirl wrote: > > > On 11/10/07, Kumar Gala <[EMAIL PROTECTED]> wrote: > >> Looking at the current driver it looks like we could get ride of if > >> check since the previous code checked the return of > >> platfo

Re: IRQs in i2c-mpc.c

2007-11-10 Thread Kumar Gala
On Nov 10, 2007, at 5:16 PM, Jon Smirl wrote: > On 11/10/07, Kumar Gala <[EMAIL PROTECTED]> 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 patc

Re: IRQs in i2c-mpc.c

2007-11-10 Thread Jon Smirl
On 11/10/07, Kumar Gala <[EMAIL PROTECTED]> 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 o

Re: IRQs in i2c-mpc.c

2007-11-10 Thread Kumar Gala
On Nov 10, 2007, at 1:44 PM, Jon Smirl wrote: > I'm doing final clean up the i2c open firmware support. What is the > intention of this code? Is it meant for a missing IRQ attribute to > return a zero and not get an IRQ for the device? Does the device > function without an IRQ? If so, it needs a