Skip to content

Commit

Permalink
software node: Add support for static node descriptors
Browse files Browse the repository at this point in the history
Until now the software nodes could only be created
dynamically with fwnode_create_software_node() function.
This introduces struct software_node data structure, which
makes it possible to describe the software nodes also
statically.

The statically described software nodes can be registered
with a new function fwnode_register_software_node(). This
also adds a helper fwnode_register_software_nodes()
which makes it possible to register an array of struct
software_nodes, i.e. multiple nodes at the same time.

There is no difference between statically described and
dynamically allocated software nodes. Even the registration
does not differ, except that during node creation the device
properties are only copied if the node is created
dynamically. With statically described nodes, the property
entries in the descriptor (struct software_node) are
assigned directly to the new software node that is being
created without any copies.

Signed-off-by: Heikki Krogerus <[email protected]>
Tested-by: Hans de Goede <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
Heikki Krogerus authored and rafaeljw committed Jun 3, 2019
1 parent 3df85a1 commit 80488a6
Show file tree
Hide file tree
Showing 2 changed files with 212 additions and 63 deletions.
Loading

0 comments on commit 80488a6

Please sign in to comment.