Re: [PATCH V2 2/2] gpio: add STA2X11 GPIO block

From: Alessandro Rubini
Date: Fri Mar 02 2012 - 05:00:21 EST


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/