gpio: dwapb: Add max GPIOs macro
authorSerge Semin <Sergey.Semin@baikalelectronics.ru>
Thu, 30 Jul 2020 15:28:01 +0000 (18:28 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 27 Aug 2020 08:32:57 +0000 (10:32 +0200)
commitf9f890ba2b13ea9ccfffd0e7354c7b64d9109790
tree89e6c0438c164635b1f5e12abd171563fbf392c2
parent75c1236a4d7c4c0ec5f7e9115f541ab08edbfc43
gpio: dwapb: Add max GPIOs macro

Add a new macro DWAPB_MAX_GPIOS which defines the maximum possible number
of GPIO lines corresponding to the maximum DW APB GPIO controller port
width. Use the new macro instead of number literal 32 where it's
applicable.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20200730152808.2955-5-Sergey.Semin@baikalelectronics.ru
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-dwapb.c
include/linux/platform_data/gpio-dwapb.h