]> git.baikalelectronics.ru Git - kernel.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)
commit3abb566781415ac964d863bc34d5671a0e75d19c
tree6c6881c532116d11ee08cba8057d73669ff96e02
parenta3ee12f65f741d22b327d310b15b52b066ba30e0
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