summaryrefslogtreecommitdiff
path: root/include/linux/property.h
diff options
context:
space:
mode:
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>2021-01-15 12:49:11 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-01-15 16:06:42 +0100
commite68d0119e3284334de5650a1ac42ef4e179f895e (patch)
treed7e8e306e030e3e8db94985b6fd4641d53a9141d /include/linux/property.h
parentc86cad04dcc8cc07e0befece5e87175c5c71dd4c (diff)
software node: Introduce device_add_software_node()
This helper will register a software node and then assign it to device at the same time. The function will also make sure that the device can't have more than one software node. Acked-by: Felipe Balbi <balbi@kernel.org> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20210115094914.88401-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/property.h')
-rw-r--r--include/linux/property.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/property.h b/include/linux/property.h
index 0a9001fe7aea..b0e413dc5927 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -488,4 +488,7 @@ fwnode_create_software_node(const struct property_entry *properties,
const struct fwnode_handle *parent);
void fwnode_remove_software_node(struct fwnode_handle *fwnode);
+int device_add_software_node(struct device *dev, const struct software_node *swnode);
+void device_remove_software_node(struct device *dev);
+
#endif /* _LINUX_PROPERTY_H_ */