On Mon, Jul 30, 2012 at 11:05:08AM -0600, Stephen Warren wrote: > On 07/29/2012 02:38 PM, Mark Brown wrote: > > On Fri, Jul 27, 2012 at 01:02:56PM -0600, Stephen Warren wrote:
> >> 1) regmap_add_irq_chips() calls regmap_add_irq_chip() with irq==0 rather > >> than -1, so in turn irq_domain_add_linear() is called rather than > >> irq_domain_add_legacy(). This change could be avoided by providing an > >> irq_bases array to regmap_add_irq_chips(). > > This is a problem. > OK, can you explain why? Is the problem the difference between the two > types of IRQ domain? I would have assumed this was an internal detail of > the driver hence not an issue. I assume there's no issue with > known/static IRQ numbers, since both 0 and -1 end up dynamically > allocating the IRQ bases IIRC. We have GPIOs we might want to do interrupts on, if the API doesn't support providing a base we've got an issue. > >> 2) regmap_add_irq_chips() requests the top-level interrupt itself, so this > >> happens before the Arizona driver hooks the child BOOT_DONE and > >> CTRLIF_ERR interrupts. In the original, all the IRQ chips were created > >> first, and then the top-level IRQ was requested. This may cause a > >> functional difference if those interrupts are pending at probe() time. > > Boot done is very likely to be asserted. > Hmmm. Perhaps that means regmap_add_irq_chips() should be split into two > parts; one to create all the IRQ chips and hook everything together, and > the second to actually enable the interrupt. That's what the existing arizona code does, it only requests the primary IRQ line once it's completed setup. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/