From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Arnd Bergmann <arnd@arndb.de>
Cc: linux-mips@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: [PATCH v2 8/9] MIPS: TXX9: Convert gpio_txx9 to dynamic GPIO base allocation
Date: Wed, 1 Jul 2026 12:11:43 +0200 [thread overview]
Message-ID: <121d6400aa83dd5339c2a2a8a95e90e98ffb326a.1782900491.git.geert@linux-m68k.org> (raw)
In-Reply-To: <cover.1782900491.git.geert@linux-m68k.org>
Static allocation of GPIO base is deprecated, use dynamic allocation.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
---
v2:
- Add Reviewed-by.
---
arch/mips/include/asm/txx9pio.h | 3 +--
arch/mips/kernel/gpio_txx9.c | 5 ++---
arch/mips/txx9/rbtx4927/setup.c | 4 ++--
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/arch/mips/include/asm/txx9pio.h b/arch/mips/include/asm/txx9pio.h
index 3d6fa9f8d5135411..c33a977244005479 100644
--- a/arch/mips/include/asm/txx9pio.h
+++ b/arch/mips/include/asm/txx9pio.h
@@ -23,7 +23,6 @@ struct txx9_pio_reg {
__u32 maskext;
};
-int txx9_gpio_init(unsigned long baseaddr,
- unsigned int base, unsigned int num);
+int txx9_gpio_init(unsigned long baseaddr, unsigned int num);
#endif /* __ASM_TXX9PIO_H */
diff --git a/arch/mips/kernel/gpio_txx9.c b/arch/mips/kernel/gpio_txx9.c
index 96ac40d20c238018..b2e73263d94c8419 100644
--- a/arch/mips/kernel/gpio_txx9.c
+++ b/arch/mips/kernel/gpio_txx9.c
@@ -76,13 +76,12 @@ static struct gpio_chip txx9_gpio_chip = {
.label = "TXx9",
};
-int __init txx9_gpio_init(unsigned long baseaddr,
- unsigned int base, unsigned int num)
+int __init txx9_gpio_init(unsigned long baseaddr, unsigned int num)
{
txx9_pioptr = ioremap(baseaddr, sizeof(struct txx9_pio_reg));
if (!txx9_pioptr)
return -ENODEV;
- txx9_gpio_chip.base = base;
+ txx9_gpio_chip.base = -1;
txx9_gpio_chip.ngpio = num;
return gpiochip_add_data(&txx9_gpio_chip, NULL);
}
diff --git a/arch/mips/txx9/rbtx4927/setup.c b/arch/mips/txx9/rbtx4927/setup.c
index 75674b4cc91d7207..e904217a5fb20102 100644
--- a/arch/mips/txx9/rbtx4927/setup.c
+++ b/arch/mips/txx9/rbtx4927/setup.c
@@ -178,7 +178,7 @@ static void __init rbtx4927_gpio_init(void)
static void __init rbtx4927_arch_init(void)
{
- txx9_gpio_init(TX4927_PIO_REG & 0xfffffffffULL, 0, TX4927_NUM_PIO);
+ txx9_gpio_init(TX4927_PIO_REG & 0xfffffffffULL, TX4927_NUM_PIO);
rbtx4927_gpio_init();
@@ -187,7 +187,7 @@ static void __init rbtx4927_arch_init(void)
static void __init rbtx4937_arch_init(void)
{
- txx9_gpio_init(TX4938_PIO_REG & 0xfffffffffULL, 0, TX4938_NUM_PIO);
+ txx9_gpio_init(TX4938_PIO_REG & 0xfffffffffULL, TX4938_NUM_PIO);
rbtx4927_gpio_init();
--
2.43.0
next prev parent reply other threads:[~2026-07-01 10:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 10:11 [PATCH v2 0/9] MIPS: TXX9: Legacy GPIO interfaces cleanup Geert Uytterhoeven
2026-07-01 10:11 ` [PATCH v2 1/9] MIPS: TXX9: Remove tx4938_spi_init() and txx9_spi_init() Geert Uytterhoeven
2026-07-01 10:11 ` [PATCH v2 2/9] MIPS: TXX9: Remove txx9_7segled_*() forward declarations Geert Uytterhoeven
2026-07-01 10:11 ` [PATCH v2 3/9] MIPS: TXX9: rbtx4927: Use GPIO lookup table for SIO DTR Geert Uytterhoeven
2026-07-01 10:11 ` [PATCH v2 4/9] MIPS: TXX9: rbtx4927: Use GPIO lookup table for TXx9 LEDs Geert Uytterhoeven
2026-07-01 14:27 ` Philippe Mathieu-Daudé
2026-07-01 10:11 ` [PATCH v2 5/9] MIPS: TXX9: Reduce TXX9_IOCLED_MAXLEDS to 3 Geert Uytterhoeven
2026-07-01 10:11 ` [PATCH v2 6/9] MIPS: TXX9: Use GPIO lookup table for iocled LEDs Geert Uytterhoeven
2026-07-01 14:29 ` Philippe Mathieu-Daudé
2026-07-01 10:11 ` [PATCH v2 7/9] MIPS: TXX9: Drop GPIOLIB_LEGACY select Geert Uytterhoeven
2026-07-01 10:11 ` Geert Uytterhoeven [this message]
2026-07-01 10:11 ` [PATCH v2 9/9] MIPS: TXX9: Clean up txx9_iocled_init() Geert Uytterhoeven
2026-07-17 11:02 ` [PATCH v2 0/9] MIPS: TXX9: Legacy GPIO interfaces cleanup Thomas Bogendoerfer
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=121d6400aa83dd5339c2a2a8a95e90e98ffb326a.1782900491.git.geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=arnd@arndb.de \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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
all inboxes | Powered by JetHome®