gpiolib: link all gpio_chips using a list
authorAlexandre Courbot <acourbot@nvidia.com>
Sat, 2 Feb 2013 16:29:24 +0000 (01:29 +0900)
committerGrant Likely <grant.likely@secretlab.ca>
Sat, 9 Feb 2013 09:20:12 +0000 (09:20 +0000)
Add a list member to gpio_chip that allows all chips to be parsed
quickly. The current method requires parsing the entire GPIO integer
space, which is painfully slow. Using a list makes many chip operations
that involve lookup or parsing faster, and also simplifies the code. It
is also necessary to eventually get rid of the global gpio_desc[] array.

The list of gpio_chips is always ordered by base GPIO number to ensure
chips traversal is done in the right order.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

No differences found