Fix IRQ Domain DT support issues and gpio IRQ


 * Summary: Fix IRQ Domain DT support issues and gpio IRQ
 * Proposer: Jean-Christophe PLAGNIOL-VILLARD
 * Status: Not selected in 2013 to be sponsored by the CE Workgroup

Description
Today the kernel have multiple issues around the IRQ


 * IRQ Domain platfrom driver support

Today if you register an irq domain via a platform driver and then use the irq in DT such as this

eth0: ethernet at 30000000 { compatible = "micrel,ks8851-mll"; reg = <0x30000000 0x1 0x30000002 0xff>; interrupt-parent = <&pioD>; interrupts = <21 IRQ_TYPE_EDGE_BOTH>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_board_eth0>; status = "okay"; };

the irq in the platform resource will not be fill as the resolve is done at of_platform_populate To fix this we need to resolve the irq at driver probe time.


 * Multiple interrupt-parent support

Today if you need the irq from 2 interrupt controler it's impossible. Such as a hw irq and a GPIO irq both provided via dt

To fix this implement a new property "interrupt-lines"

that will work in a same way as gpios by providing firt the phandle of the controller and then the cell data

interrupt-lines = <&aic 0 4 0 & pioD 21 IRQ_TYPE_EDGE_BOTH>;


 * gpio irq DT

Today you need to use a gpio as IRQ you need to configure it and then use it As a in the kernel we make the disctinction between standard IRQ and gpio IRQ. This should have never been the case and need to be fix up widely. By droping all the gpio_to_irq in the drivers and ONLY provide interrupts

Related work
http://permalink.gmane.org/gmane.linux.drivers.devicetree/36679

Scope
I think this will take about 3 to 5 month depending on the discussion on the kernel mainling list with an effort of about 240 to 300 hours.

Contractor Candidates
Jean-Christophe PLAGNIOL-VILLARD 

Comments
By Linus Walleij

Actually I have that problem today. An MMC card slot with two IRQs for the traffic and another totally different IRQ for the card insertion IRQ, sitting on a different controller, and this one is not even a GPIO, so I cannot cheat and have it as a GPIO that I then translate into an IRQ.

Overall Jean-Christophe's proposal is correctly pinpointing some serious unhandled corner cases we have in DT land.

Reasons for CEWG not selecting this project
This proposal was submitted very late (well past the deadline), and there was no time to analyze it, solicit member feedback, or get bids.