Re: I2C OF IRQ parsing issue due to probe ordering

2014-10-30 Thread Thierry Reding
On Thu, Oct 30, 2014 at 03:22:49PM +0200, Laurent Pinchart wrote: > Hi Wolfram, > > On Thursday 30 October 2014 14:21:36 Wolfram Sang wrote: > > > > See: > > > > 9ec36cafe43b of/irq: do irq resolution in platform_get_irq > > > > > > > > I suspect a similar thing could be done for I2C. > >

Re: I2C OF IRQ parsing issue due to probe ordering

2014-10-30 Thread Laurent Pinchart
Hi Wolfram, On Thursday 30 October 2014 14:21:36 Wolfram Sang wrote: > > > See: > > > 9ec36cafe43b of/irq: do irq resolution in platform_get_irq > > > > > > I suspect a similar thing could be done for I2C. > > > > That could work. We would need to introduce a new i2c_get_irq() function > > tho

Re: I2C OF IRQ parsing issue due to probe ordering

2014-10-30 Thread Wolfram Sang
> > See: > > > > 9ec36cafe43b of/irq: do irq resolution in platform_get_irq > > > > I suspect a similar thing could be done for I2C. > > That could work. We would need to introduce a new i2c_get_irq() function > though. Wolfram, would you be fine with that ? I'd think it will look pretty

Re: I2C OF IRQ parsing issue due to probe ordering

2014-10-30 Thread Laurent Pinchart
Hi Thierry, On Thursday 30 October 2014 14:02:09 Thierry Reding wrote: > On Thu, Oct 30, 2014 at 02:53:42PM +0200, Laurent Pinchart wrote: > > On Monday 27 October 2014 13:58:19 Wolfram Sang wrote: > > > > The i2c@e652 node is probed before the gpio@e6051000 node. The > > > > of_i2c_register_d

Re: I2C OF IRQ parsing issue due to probe ordering

2014-10-30 Thread Laurent Pinchart
Hi Thierry, On Thursday 30 October 2014 13:56:46 Thierry Reding wrote: > On Mon, Oct 27, 2014 at 01:58:19PM +0100, Wolfram Sang wrote: > > > The i2c@e652 node is probed before the gpio@e6051000 node. The > > > of_i2c_register_devices() function tries to register all children, > > > including h

Re: I2C OF IRQ parsing issue due to probe ordering

2014-10-30 Thread Thierry Reding
On Thu, Oct 30, 2014 at 02:53:42PM +0200, Laurent Pinchart wrote: > Hi Wolfram and Thierry, > > On Monday 27 October 2014 13:58:19 Wolfram Sang wrote: > > > The i2c@e652 node is probed before the gpio@e6051000 node. The > > > of_i2c_register_devices() function tries to register all children, >

Re: I2C OF IRQ parsing issue due to probe ordering

2014-10-30 Thread Thierry Reding
On Mon, Oct 27, 2014 at 01:58:19PM +0100, Wolfram Sang wrote: > > > The i2c@e652 node is probed before the gpio@e6051000 node. The > > of_i2c_register_devices() function tries to register all children, including > > hdmi@39. It tries to parse and map the I2C client IRQ by calling > > irq_of_pa

Re: I2C OF IRQ parsing issue due to probe ordering

2014-10-30 Thread Laurent Pinchart
Hi Wolfram and Thierry, On Monday 27 October 2014 13:58:19 Wolfram Sang wrote: > > The i2c@e652 node is probed before the gpio@e6051000 node. The > > of_i2c_register_devices() function tries to register all children, > > including hdmi@39. It tries to parse and map the I2C client IRQ by > > ca

Re: I2C OF IRQ parsing issue due to probe ordering

2014-10-30 Thread Laurent Pinchart
Hi Ezequiel, On Thursday 30 October 2014 08:58:28 Ezequiel Garcia wrote: > On 10/25/2014 07:13 PM, Laurent Pinchart wrote: > > Hello, > > > > I recently ran into an issue with the OF IRQ parsing code in the I2C core > > (of_i2c_register_devices in drivers/i2c/i2c-core.c). > > > > My DT contains

Re: I2C OF IRQ parsing issue due to probe ordering

2014-10-30 Thread Ezequiel Garcia
Hi Laurent, On 10/25/2014 07:13 PM, Laurent Pinchart wrote: > Hello, > > I recently ran into an issue with the OF IRQ parsing code in the I2C core > (of_i2c_register_devices in drivers/i2c/i2c-core.c). > > My DT contains the following nodes. > > gpio1: gpio@e6051000 { >

Re: I2C OF IRQ parsing issue due to probe ordering

2014-10-27 Thread Wolfram Sang
> The i2c@e652 node is probed before the gpio@e6051000 node. The > of_i2c_register_devices() function tries to register all children, including > hdmi@39. It tries to parse and map the I2C client IRQ by calling > irq_of_parse_and_map(), which returns 0 as the interrupt controller isn't > probe

I2C OF IRQ parsing issue due to probe ordering

2014-10-25 Thread Laurent Pinchart
Hello, I recently ran into an issue with the OF IRQ parsing code in the I2C core (of_i2c_register_devices in drivers/i2c/i2c-core.c). My DT contains the following nodes. gpio1: gpio@e6051000 { ... #interrupt-cells = <2>; interrupt-controlle