Skip to content

gpio: Get rid of ARCH_NR_GPIOS (v2)

Christophe Leroy linux-arch linux-arm-kernel linux-doc linux-gpio lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 13 repliesIn review
  2. v18 patches 15 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9gpio: Remove sta2x11 GPIO driverdrivers/gpio/Kconfig drivers/gpio/Makefile drivers/gpio/gpio-sta2x11.c+0 -4200 replies
2/9gpio: aggregator: Stop using ARCH_NR_GPIOSdrivers/gpio/gpio-aggregator.c+4 -30 replies
3/9gpio: davinci: Stop using ARCH_NR_GPIOSdrivers/gpio/gpio-davinci.c+0 -30 replies
4/9gpiolib: Warn on drivers still using static gpiobase allocationdrivers/gpio/gpiolib.c+3 -00 replies
5/9gpiolib: Get rid of ARCH_NR_GPIOSarch/arm/include/asm/gpio.h drivers/gpio/gpiolib.c include/asm-generic/gpio.h+26 -402 replies
6/9Documentation: gpio: Remove text about ARCH_NR_GPIOSDocumentation/driver-api/gpio/legacy.rst+0 -50 replies
7/9x86: Remove CONFIG_ARCH_NR_GPIOarch/x86/Kconfig+0 -51 reply
8/9arm: Remove CONFIG_ARCH_NR_GPIOarch/arm/Kconfig+0 -210 replies
9/9arm64: Remove CONFIG_ARCH_NR_GPIOarch/arm64/Kconfig+0 -120 replies

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAndy ShevchenkoGeert UytterhoevenGiancarlo AsnaghiLinus WalleijArnd BergmannThomas Gleixner
SeriesA-b A-b
1/9A-b A-b
2/9R-b R-b
3/9R-b
4/9R-b
5/9R-b
6/9R-b
7/9R-b A-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/9] gpio: Get rid of ARCH_NR_GPIOS (v2)

Since commit 14e85c0e69d5 ("gpio: remove gpio_descs global array") there is no limitation on the number of GPIOs that can be allocated in the system since the allocation is fully dynamic.

ARCH_NR_GPIOS is today only used in order to provide downwards gpiobase allocation from that value, while static allocation is performed upwards from 0. However that has the disadvantage of limiting the number of GPIOs that can be registered in the system.

To overcome this limitation without requiring each and every platform to provide its 'best-guess' maximum number, rework the allocation to allocate from 512 upwards, allowing approx 2 millions of GPIOs.

In the meantime, add a warning for drivers how are still doing static allocation, so that in the future the static allocation gets removed completely and dynamic allocation can start at base 0.

Main changes in v2:
- Adding a patch to remove sta2x11 GPIO driver instead of modifying it
- Moving the base of dynamic allocation from 256 to 512 because there are drivers allocating gpios as high as 400.

Christophe Leroy (8):
gpio: aggregator: Stop using ARCH_NR_GPIOS
gpio: davinci: Stop using ARCH_NR_GPIOS
gpiolib: Warn on drivers still using static gpiobase allocation
gpiolib: Get rid of ARCH_NR_GPIOS
Documentation: gpio: Remove text about ARCH_NR_GPIOS
x86: Remove CONFIG_ARCH_NR_GPIO
arm: Remove CONFIG_ARCH_NR_GPIO
arm64: Remove CONFIG_ARCH_NR_GPIO

Davide Ciminaghi (1):
gpio: Remove sta2x11 GPIO driver

 Documentation/driver-api/gpio/legacy.rst |   5 -
 arch/arm/Kconfig                         |  21 --
 arch/arm/include/asm/gpio.h              |   1 -
 arch/arm64/Kconfig                       |  12 -
 arch/x86/Kconfig                         |   5 -
 drivers/gpio/Kconfig                     |   8 -
 drivers/gpio/Makefile                    |   1 -
 drivers/gpio/gpio-aggregator.c           |   7 +-
 drivers/gpio/gpio-davinci.c              |   3 -
 drivers/gpio/gpio-sta2x11.c              | 411 -----------------------
 drivers/gpio/gpiolib.c                   |  13 +-
 include/asm-generic/gpio.h               |  55 ++-
 12 files changed, 33 insertions(+), 509 deletions(-)
 delete mode 100644 drivers/gpio/gpio-sta2x11.c
Signature · 7 lines
2.37.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel