aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-12-25 15:01:46 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-12-25 15:01:46 -0800
commitd8924c0d76aaa52e4811b5c64115d9a7f36cc73a (patch)
tree42869e702ac8c479f8f77cb74855fdc4a668d149 /include
parent1fbb2dc6f0ce95e73b9bd7e8e899089f5cebc99a (diff)
parentf569da8c994c2254a106bdb537aa271399e288ec (diff)
Merge tag 'devprop-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull device properties framework updates from Rafael Wysocki: "This introduces 'software nodes' that are analogous to the DT and ACPI firmware nodes except that they can be created by drivers themselves and do a couple of assorted cleanups. Specifics: - Introduce "software nodes", analogous to the DT and ACPI firmware nodes except that they can be created by kernel code, in order to complement fwnodes representing real firmware nodes when they are incomplete (for example missing device properties) and to supply the primary fwnode when the firmware lacks hardware description for a device completely, and replace the "property_set" struct fwnode_handle type with software nodes (Heikki Krogerus). - Clean up the just introduced software nodes support and fix a commet in the graph-handling code (Colin Ian King, Marco Felsch)" * tag 'devprop-4.21-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: device property: fix fwnode_graph_get_next_endpoint() documentation drivers: base: swnode: remove need for a temporary string for the node name device property: Remove struct property_set device property: Move device_add_properties() to swnode.c drivers: base: Introducing software nodes to the firmware node framework ACPI / glue: Add acpi_platform_notify() function drivers core: Prepare support for multiple platform notifications driver core: platform: Remove duplicated device_remove_properties() call
Diffstat (limited to 'include')
-rw-r--r--include/linux/acpi.h10
-rw-r--r--include/linux/property.h12
2 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 4b3283cb09ab..87715f20b69a 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -1331,4 +1331,14 @@ static inline int find_acpi_cpu_cache_topology(unsigned int cpu, int level)
}
#endif
+#ifdef CONFIG_ACPI
+extern int acpi_platform_notify(struct device *dev, enum kobject_action action);
+#else
+static inline int
+acpi_platform_notify(struct device *dev, enum kobject_action action)
+{
+ return 0;
+}
+#endif
+
#endif /*_LINUX_ACPI_H*/
diff --git a/include/linux/property.h b/include/linux/property.h
index ac8a1ebc4c1b..3789ec755fb6 100644
--- a/include/linux/property.h
+++ b/include/linux/property.h
@@ -311,4 +311,16 @@ fwnode_graph_get_remote_node(const struct fwnode_handle *fwnode, u32 port,
int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
struct fwnode_endpoint *endpoint);
+/* -------------------------------------------------------------------------- */
+/* Software fwnode support - when HW description is incomplete or missing */
+
+bool is_software_node(const struct fwnode_handle *fwnode);
+
+int software_node_notify(struct device *dev, unsigned long action);
+
+struct fwnode_handle *
+fwnode_create_software_node(const struct property_entry *properties,
+ const struct fwnode_handle *parent);
+void fwnode_remove_software_node(struct fwnode_handle *fwnode);
+
#endif /* _LINUX_PROPERTY_H_ */