From: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
To: Lee Jones <lee@kernel.org>, Thomas Gleixner <tglx@kernel.org>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: brgl@kernel.org, linux-kernel@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: [PATCH 1/2] mfd: cs5535: add, assign and expose the software node for the GPIO cell
Date: Wed, 29 Apr 2026 14:23:30 +0200 [thread overview]
Message-ID: <20260429-cs5535-swnode-v1-1-2bc5e17ddcf9@oss.qualcomm.com> (raw)
In-Reply-To: <20260429-cs5535-swnode-v1-0-2bc5e17ddcf9@oss.qualcomm.com>
There are board files in-tree that want to request GPIOs from this chip.
They currently rely on the GPIO core's mechanism of matching software
nodes' labels against GPIO controller names. We want to remove this
behavior from the kernel and to this end, we need to associate the
referenced GPIO controller with its target software node.
Create a dedicated GPIO software node for cs5535, assign it to the GPIO
cell and expose its address in a new header.
We only expose a single software node instance but that's alright: all
existing hardware only contains a single cs5535 companion and the geode
board file for which we expose this is legacy anyway.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
---
drivers/mfd/cs5535-mfd.c | 9 +++++++++
include/linux/mfd/cs5535.h | 8 ++++++++
2 files changed, 17 insertions(+)
diff --git a/drivers/mfd/cs5535-mfd.c b/drivers/mfd/cs5535-mfd.c
index d0fb2e52ee76a82ab18f668f41b10ac3f4e01ed3..f3becbef19f5dac1905660df1ac6cbc4f7f4d867 100644
--- a/drivers/mfd/cs5535-mfd.c
+++ b/drivers/mfd/cs5535-mfd.c
@@ -12,8 +12,11 @@
#include <linux/kernel.h>
#include <linux/mfd/core.h>
+#include <linux/mfd/cs5535.h>
#include <linux/module.h>
#include <linux/pci.h>
+#include <linux/property.h>
+
#include <asm/olpc.h>
#define DRV_NAME "cs5535-mfd"
@@ -29,6 +32,11 @@ enum cs5535_mfd_bars {
static struct resource cs5535_mfd_resources[NR_BARS];
+const struct software_node cs5535_gpio_swnode = {
+ .name = "cs5535-gpio",
+};
+EXPORT_SYMBOL_NS(cs5535_gpio_swnode, "CS5535");
+
static struct mfd_cell cs5535_mfd_cells[] = {
{
.name = "cs5535-smb",
@@ -39,6 +47,7 @@ static struct mfd_cell cs5535_mfd_cells[] = {
.name = "cs5535-gpio",
.num_resources = 1,
.resources = &cs5535_mfd_resources[GPIO_BAR],
+ .swnode = &cs5535_gpio_swnode,
},
{
.name = "cs5535-mfgpt",
diff --git a/include/linux/mfd/cs5535.h b/include/linux/mfd/cs5535.h
new file mode 100644
index 0000000000000000000000000000000000000000..2e4ebf5d06af7453c417b3b5dda14572fb5e1ab2
--- /dev/null
+++ b/include/linux/mfd/cs5535.h
@@ -0,0 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#ifndef __MFD_CS5535_H__
+#define __MFD_CS5535_H__
+
+extern const struct software_node cs5535_gpio_swnode;
+
+#endif /* __MFD_CS5535_H__ */
--
2.47.3
next prev parent reply other threads:[~2026-04-29 12:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 12:23 [PATCH 0/2] x86/platform/geode: enable real fwnode GPIO lookup Bartosz Golaszewski
2026-04-29 12:23 ` Bartosz Golaszewski [this message]
2026-05-07 15:21 ` (subset) [PATCH 1/2] mfd: cs5535: add, assign and expose the software node for the GPIO cell Lee Jones
2026-05-11 7:54 ` Bartosz Golaszewski
2026-05-13 13:28 ` Lee Jones
2026-05-13 13:38 ` Bartosz Golaszewski
2026-05-19 12:05 ` Bartosz Golaszewski
2026-05-21 13:52 ` Lee Jones
2026-04-29 12:23 ` [PATCH 2/2] x86/platform/geode: reference the real node of the cs5535 GPIO controller Bartosz Golaszewski
2026-04-29 19:06 ` Dmitry Torokhov
2026-04-30 7:10 ` Bartosz Golaszewski
2026-05-21 14:03 ` Bartosz Golaszewski
2026-05-21 14:19 ` Dave Hansen
2026-05-22 8:25 ` 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=20260429-cs5535-swnode-v1-1-2bc5e17ddcf9@oss.qualcomm.com \
--to=bartosz.golaszewski@oss.qualcomm.com \
--cc=bp@alien8.de \
--cc=brgl@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=dmitry.torokhov@gmail.com \
--cc=hpa@zytor.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@kernel.org \
--cc=x86@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
all inboxes | Powered by JetHome®