From: Mohamed Ayman <mohamedaymanworkspace@gmail.com>
To: Linus Walleij <linusw@kernel.org>, Imre Kaloz <kaloz@openwrt.org>,
Bartosz Golaszewski <brgl@kernel.org>,
linux-arm-kernel@lists.infradead.org (moderated list:ARM/INTEL
IXP4XX ARM ARCHITECTURE),
linux-gpio@vger.kernel.org (open list:GPIO SUBSYSTEM),
linux-kernel@vger.kernel.org (open list)
Cc: Mohamed Ayman <mohamedaymanworkspace@gmail.com>,
linux-arm-kernel@lists.infradead.org (moderated list:ARM/INTEL
IXP4XX ARM ARCHITECTURE),
linux-gpio@vger.kernel.org (open list:GPIO SUBSYSTEM),
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] gpio: ixp4xx: switch to dynamic GPIO base
Date: Tue, 28 Apr 2026 00:43:10 +0300 [thread overview]
Message-ID: <20260427214311.331996-1-mohamedaymanworkspace@gmail.com> (raw)
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
next reply other threads:[~2026-04-27 21:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-27 21:43 Mohamed Ayman [this message]
2026-04-28 7:56 ` [PATCH] gpio: ixp4xx: switch to dynamic GPIO base Linus Walleij
2026-04-28 8:14 ` Bartosz Golaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260427214311.331996-1-mohamedaymanworkspace@gmail.com \
--to=mohamedaymanworkspace@gmail.com \
--cc=brgl@kernel.org \
--cc=kaloz@openwrt.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox