Messages in this thread | | | Date | Fri, 2 Mar 2012 11:00:12 +0100 | From | Alessandro Rubini <> | Subject | Re: [PATCH V2 2/2] gpio: add STA2X11 GPIO block |
| |
Thank you Grant for your comments. Agreed with all of them.
>> + /* 384 was used in previous code: be compatible for other drivers */ >> + err = irq_alloc_descs(-1, 384, GSTA_NR_GPIO, NUMA_NO_NODE); > > That's a lot of irqs. Will they all be used?
384 is the starting point, isn't it? The number is 128. One per gpio pin. We have change-detect for mmc and other stuff that live in high gpio numbers.
> How do other drivers determine which irq number to use (is it > statically assigned, or is there a dynamic mechanism)? If only a > portion are used, then the irq_domain linear mapping would be a win > here.
The code I received uses static numbers. The chip is the main chipset in the typical use case, so only one is there even if it is PCI. I also have a PCIe card to use it as slave device, and I'm careful to allow several of them, even if it's not the main use case. Maybe here I fell short. I'm reposting soon, with a full change log.
This "compatibility" is something I need to run the boards with existing code for the parts that are not cleaned up for upstream, yet.
/alessandro
| |