On 26/03/13 09:34, Laxman Dewangan wrote:Ok that makes sense if you are actually planning to feed non palmas IRQsHere we are hardcoding for PALMAS_ID_OTG_IRQ and so on. If we takeIf we are tightly coupling as above then using platform_irq is an extra
Kishon,
I think it is very much possible. You can pass the interrupt throough
IRQ_RESOURCE and populate it from DT. If you provide proper interrupt
parent and irq number then irq framework take care of every thing.
already tested this with RTC interrupt of plama and it worked very
well.
inefficiency. You both have to populate this then parse it afterwards.
Why not just use the regmap helper? Ill admit this code is like this as
there was a period where platform irqs in DT just was not working right!
We should really agree now if we are going for loose or tight coupling
now rather than keep switching?
data from platform then it need not and it will be completely
independent of palma atleast on this front.
We need to populate just as:
palmas: palmas {
:::::::
palams_usb_phy {
compatile = ...
interrupt-parent = <& palmas>;
interrupt = < 10, 0,
21, 0,
22, 0,
23, 0>;
}
and in code, we just need to do
irq1 = platform_get_irq(pdev, 0);
irq2 = platform_get_irq(pdev, 1);
etc..
So here, actually we do not need to use palmas one and it is
completely independent.
Also the way you define the DT od palmas, the above one looks more
appropriate.
to the usb via either palmas GPIO or even directly! I did not know there
was such a use case!
Graeme