From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>,
Russell King <linux@armlinux.org.uk>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
soc@lists.linux.dev
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org
Subject: [PATCH 1/4] gpio: sa1100: register software node for GPIO controller
Date: Mon, 06 Jul 2026 20:14:00 -0700 [thread overview]
Message-ID: <20260706-sa1100-swnode-v1-1-332759bbd930@gmail.com> (raw)
In-Reply-To: <20260706-sa1100-swnode-v1-0-332759bbd930@gmail.com>
Define and register a static software node (sa1100_gpiochip_node) for the
SA-1100 GPIO controller during sa1100_init_gpio(). Assign its firmware node
directly to the GPIO chip prior to calling gpiochip_add_data().
This allows StrongARM SA-1100 board setup files to reference the SoC GPIO
controller in property entries when converting legacy platform data to
software nodes, resolving pin bindings directly via the attached firmware
node without relying on name matching.
Assisted-by: Antigravity:gemini-3.5-flash
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
arch/arm/mach-sa1100/generic.h | 3 +++
drivers/gpio/gpio-sa1100.c | 10 +++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h
index 5fe0d4fc0f8c..3cfe3b647711 100644
--- a/arch/arm/mach-sa1100/generic.h
+++ b/arch/arm/mach-sa1100/generic.h
@@ -48,6 +48,9 @@ int sa11xx_clk_init(void);
struct gpiod_lookup_table;
void sa11x0_register_pcmcia(int socket, struct gpiod_lookup_table *);
+struct software_node;
+extern const struct software_node sa1100_gpiochip_node;
+
struct fixed_voltage_config;
struct regulator_consumer_supply;
int sa11x0_register_fixed_regulator(int n, struct fixed_voltage_config *cfg,
diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c
index 1938ffa2f4f3..ffa73dd3b982 100644
--- a/drivers/gpio/gpio-sa1100.c
+++ b/drivers/gpio/gpio-sa1100.c
@@ -13,6 +13,11 @@
#include <mach/hardware.h>
#include <mach/irqs.h>
#include <mach/generic.h>
+#include <linux/property.h>
+
+const struct software_node sa1100_gpiochip_node = {
+ .name = "sa1100-gpio",
+};
struct sa1100_gpio_chip {
struct gpio_chip chip;
@@ -317,6 +322,7 @@ static const int sa1100_gpio_irqs[] __initconst = {
void __init sa1100_init_gpio(void)
{
struct sa1100_gpio_chip *sgc = &sa1100_gpio_chip;
+ struct gpio_chip *gc = &sgc->chip;
int i;
/* clear all GPIO edge detects */
@@ -324,7 +330,9 @@ void __init sa1100_init_gpio(void)
writel_relaxed(0, sgc->membase + R_GRER);
writel_relaxed(-1, sgc->membase + R_GEDR);
- gpiochip_add_data(&sa1100_gpio_chip.chip, NULL);
+ software_node_register(&sa1100_gpiochip_node);
+ gc->fwnode = software_node_fwnode(&sa1100_gpiochip_node);
+ gpiochip_add_data(gc, NULL);
sa1100_gpio_irqdomain = irq_domain_create_simple(NULL,
28, IRQ_GPIO0,
--
2.55.0.rc2.803.g1fd1e6609c-goog
next prev parent reply other threads:[~2026-07-07 3:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-07 3:13 [PATCH 0/4] ARM: sa1100: convert gpio-keys to software nodes Dmitry Torokhov
2026-07-07 3:14 ` Dmitry Torokhov [this message]
2026-07-07 3:14 ` [PATCH 2/4] ARM: sa1100: assabet: convert gpio-keys to use " Dmitry Torokhov
2026-07-07 3:14 ` [PATCH 3/4] ARM: sa1100: collie: " Dmitry Torokhov
2026-07-07 3:14 ` [PATCH 4/4] ARM: sa1100: h3xxx: " Dmitry Torokhov
2026-07-07 8:08 ` [PATCH 0/4] ARM: sa1100: convert gpio-keys to " Bartosz Golaszewski
2026-07-07 8:14 ` Arnd Bergmann
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=20260706-sa1100-swnode-v1-1-332759bbd930@gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=arnd@arndb.de \
--cc=brgl@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=soc@lists.linux.dev \
/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