]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: brcmstb: allow 0 width GPIO banks
authorJustin Chen <justinpopo6@gmail.com>
Fri, 17 Aug 2018 23:47:39 +0000 (16:47 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 30 Aug 2018 09:04:50 +0000 (11:04 +0200)
commit49f1c78d55a4b3eacc18a238bd35d882eff67ede
tree75bfa2b4b1ab507af57369632bba828645b06d6c
parentf1904241ae4256962b7597fc887031f8c4747324
gpio: brcmstb: allow 0 width GPIO banks

Sometimes we have empty banks within the GPIO block. This commit allows
proper handling of 0 width GPIO banks. We handle 0 width GPIO banks by
incrementing the bank and number of GPIOs, but not initializing them.
This will mean a call into the non-existent GPIOs will return an error.

Also remove "GPIO registered" dev print. This information is misleading
since the incremented banks and gpio_base do not reflect the actual GPIOs
that get initialized. We leave this information out since it is already
printed with dev_dbg.

Signed-off-by: Justin Chen <justinpopo6@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-brcmstb.c