From: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Daniel Scally <djrscally@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Jakub Kicinski <kuba@kernel.org>,
linux-acpi@vger.kernel.org, netdev@vger.kernel.org,
Paolo Abeni <pabeni@redhat.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Vladimir Oltean <olteanv@gmail.com>
Subject: [PATCH RFC net-next 1/7] software node: allow named software node to be created
Date: Wed, 22 Mar 2023 11:59:55 +0000 [thread overview]
Message-ID: <E1pex8F-00Dvnf-Sm@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <ZBrtqPW29NnxVoEc@shell.armlinux.org.uk>
From: Vladimir Oltean <vladimir.oltean@nxp.com>
Allow a named software node to be created, which is needed for software
nodes for a fixed-link specification for DSA.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
drivers/base/swnode.c | 14 ++++++++++++--
include/linux/property.h | 4 ++++
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c
index 1886995a0b3a..e4d07e1655a9 100644
--- a/drivers/base/swnode.c
+++ b/drivers/base/swnode.c
@@ -911,8 +911,9 @@ void software_node_unregister(const struct software_node *node)
EXPORT_SYMBOL_GPL(software_node_unregister);
struct fwnode_handle *
-fwnode_create_software_node(const struct property_entry *properties,
- const struct fwnode_handle *parent)
+fwnode_create_named_software_node(const struct property_entry *properties,
+ const struct fwnode_handle *parent,
+ const char *name)
{
struct fwnode_handle *fwnode;
struct software_node *node;
@@ -930,6 +931,7 @@ fwnode_create_software_node(const struct property_entry *properties,
return ERR_CAST(node);
node->parent = p ? p->node : NULL;
+ node->name = name;
fwnode = swnode_register(node, p, 1);
if (IS_ERR(fwnode))
@@ -937,6 +939,14 @@ fwnode_create_software_node(const struct property_entry *properties,
return fwnode;
}
+EXPORT_SYMBOL_GPL(fwnode_create_named_software_node);
+
+struct fwnode_handle *
+fwnode_create_software_node(const struct property_entry *properties,
+ const struct fwnode_handle *parent)
+{
+ return fwnode_create_named_software_node(properties, parent, NULL);
+}
EXPORT_SYMBOL_GPL(fwnode_create_software_node);
void fwnode_remove_software_node(struct fwnode_handle *fwnode)
diff --git a/include/linux/property.h b/include/linux/property.h
index 0a29db15ff34..f7100e836eb4 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -495,6 +495,10 @@ void software_node_unregister(const struct software_node *node);
struct fwnode_handle *
fwnode_create_software_node(const struct property_entry *properties,
const struct fwnode_handle *parent);
+struct fwnode_handle *
+fwnode_create_named_software_node(const struct property_entry *properties,
+ const struct fwnode_handle *parent,
+ const char *name);
void fwnode_remove_software_node(struct fwnode_handle *fwnode);
int device_add_software_node(struct device *dev, const struct software_node *node);
--
2.30.2
next prev parent reply other threads:[~2023-03-22 12:00 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-22 11:59 [PATCH RFC net-next 0/7] Another attempt at moving mv88e6xxx forward Russell King (Oracle)
2023-03-22 11:59 ` Russell King [this message]
2023-03-23 13:59 ` [PATCH RFC net-next 1/7] software node: allow named software node to be created Andy Shevchenko
2023-03-23 14:29 ` Russell King (Oracle)
2023-03-23 14:39 ` Andy Shevchenko
2023-03-22 12:00 ` [PATCH RFC net-next 2/7] net: phylink: provide phylink_find_max_speed() Russell King (Oracle)
2023-03-22 18:44 ` Andrew Lunn
2023-03-22 12:00 ` [PATCH RFC net-next 3/7] net: dsa: use fwnode_get_phy_mode() to get phy interface mode Russell King (Oracle)
2023-03-22 18:42 ` Andrew Lunn
2023-03-23 14:03 ` Andy Shevchenko
2023-03-23 14:31 ` Russell King (Oracle)
2023-03-23 14:38 ` Andy Shevchenko
2023-03-23 14:49 ` Russell King (Oracle)
2023-03-23 15:00 ` Andy Shevchenko
2023-03-23 15:23 ` Russell King (Oracle)
2023-03-23 15:33 ` Andy Shevchenko
2023-03-23 16:29 ` Russell King (Oracle)
2023-03-23 16:18 ` Russell King (Oracle)
2023-03-23 16:34 ` Andy Shevchenko
2023-03-23 16:39 ` Andy Shevchenko
2023-03-23 17:06 ` Russell King (Oracle)
2023-03-23 17:28 ` Andy Shevchenko
2023-03-23 17:53 ` Russell King (Oracle)
2023-03-23 18:04 ` Andy Shevchenko
2023-03-23 20:46 ` Russell King (Oracle)
2023-03-22 12:00 ` [PATCH RFC net-next 4/7] net: dsa: add ability for switch driver to provide a swnode Russell King (Oracle)
2023-03-22 12:00 ` [PATCH RFC net-next 5/7] net: dsa: avoid DT validation for drivers which provide default config Russell King (Oracle)
2023-03-22 18:51 ` Andrew Lunn
2023-03-22 20:09 ` Russell King (Oracle)
2023-03-22 20:14 ` Andrew Lunn
2023-03-22 20:20 ` Russell King (Oracle)
2023-03-22 12:00 ` [PATCH RFC net-next 6/7] net: dsa: mv88e6xxx: provide software node for default settings Russell King (Oracle)
2023-03-22 18:57 ` Andrew Lunn
2023-03-22 20:13 ` Russell King (Oracle)
2023-03-22 20:17 ` Andrew Lunn
2023-03-22 20:22 ` Russell King (Oracle)
2023-03-22 21:40 ` Andrew Lunn
2023-03-23 8:41 ` Russell King (Oracle)
2023-03-23 18:17 ` Andrew Lunn
2023-03-23 18:25 ` Russell King (Oracle)
2023-03-23 18:34 ` Andrew Lunn
2023-03-24 14:49 ` Heikki Krogerus
2023-03-24 17:04 ` Russell King (Oracle)
2023-03-27 10:28 ` Heikki Krogerus
2023-03-27 10:55 ` Russell King (Oracle)
2023-03-27 14:13 ` Heikki Krogerus
2023-03-27 14:32 ` Russell King (Oracle)
2023-03-27 15:45 ` Russell King (Oracle)
2023-03-28 12:09 ` Heikki Krogerus
2023-03-28 13:23 ` Russell King (Oracle)
2023-03-29 14:07 ` Heikki Krogerus
2023-03-29 14:33 ` Russell King (Oracle)
2023-03-30 13:54 ` Heikki Krogerus
2023-04-03 13:02 ` Russell King (Oracle)
2023-04-05 17:51 ` Greg Kroah-Hartman
2023-03-22 12:00 ` [PATCH RFC net-next 7/7] net: dsa: mv88e6xxx: remove handling for DSA and CPU ports Russell King (Oracle)
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=E1pex8F-00Dvnf-Sm@rmk-PC.armlinux.org.uk \
--to=rmk+kernel@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=andriy.shevchenko@linux.intel.com \
--cc=davem@davemloft.net \
--cc=djrscally@gmail.com \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=rafael@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/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;
as well as URLs for NNTP newsgroup(s).