]> asedeno.scripts.mit.edu Git - linux.git/commit
gpio: aspeed: Use ngpio property from device tree if available
authorRashmica Gupta <rashmica.g@gmail.com>
Fri, 6 Sep 2019 06:27:26 +0000 (16:27 +1000)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 11 Sep 2019 10:11:16 +0000 (11:11 +0100)
commitbe2a7e2d5d98d288f00af4e9e2ba829aab1ebaef
tree6c6881c532116d11ee08cba8057d73669ff96e02
parent3d64a5a742ac95f2e6384605ea2825aa1c17e575
gpio: aspeed: Use ngpio property from device tree if available

Use the ngpio property from the device tree if it exists. If it doesn't
then fallback to the hardcoded value in the config.

This is in preparation for adding ast2600 support. The ast2600 SoC has
two GPIO controllers and so requires two instances of the GPIO driver.
We use the ngpio property to different between them as they have
different numbers of GPIOs.

Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
Link: https://lore.kernel.org/r/20190906062727.13521-1-rashmica.g@gmail.com
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-aspeed.c