Messages in this thread Patch in this message |  | | From | Mohamed Ayman <> | | Subject | [PATCH] gpio: ixp4xx: switch to dynamic GPIO base | | Date | Tue, 28 Apr 2026 00:43:10 +0300 |
| |
Most IXP4xx platforms are Device Tree-based, and GPIO consumers use phandle-based descriptors rather than legacy integer GPIO numbers.
Audit of the IXP4xx platform shows: - No gpio_request(), gpio_get_value(), or gpio_set_value() users in arch/arm/mach-ixp4xx/ - No platform data using fixed GPIO numbers
This switches the gpiochip to dynamic base allocation, aligning with modern gpiolib expectations where GPIO numbers are not globally fixed and may be assigned dynamically.
Set gpiochip.base = -1 to allow gpiolib to assign the GPIO base dynamically, avoiding global GPIO number space conflicts.
Signed-off-by: Mohamed Ayman <mohamedaymanworkspace@gmail.com> --- drivers/gpio/gpio-ixp4xx.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpio/gpio-ixp4xx.c b/drivers/gpio/gpio-ixp4xx.c index f34d87869c8b..669b139cd499 100644 --- a/drivers/gpio/gpio-ixp4xx.c +++ b/drivers/gpio/gpio-ixp4xx.c @@ -311,12 +311,7 @@ static int ixp4xx_gpio_probe(struct platform_device *pdev) } g->chip.gc.ngpio = 16; g->chip.gc.label = "IXP4XX_GPIO_CHIP"; - /* - * TODO: when we have migrated to device tree and all GPIOs - * are fetched using phandles, set this to -1 to get rid of - * the fixed gpiochip base. - */ - g->chip.gc.base = 0; + g->chip.gc.base = -1; g->chip.gc.parent = &pdev->dev; g->chip.gc.owner = THIS_MODULE; -- 2.34.1
|  |