class Manager
Defined at line 23 of file ../../sdk/lib/driver/devicetree/manager/manager.h
Public Methods
void Manager (std::vector<uint8_t> fdt_blob)
Create a new device tree manager using the given FDT blob.
Defined at line 27 of file ../../sdk/lib/driver/devicetree/manager/manager.h
const std::vector<std::unique_ptr<Node>> & nodes ()
Defined at line 52 of file ../../sdk/lib/driver/devicetree/manager/manager.h
zx::result<Manager> CreateFromNamespace (fdf::Namespace & ns)
Defined at line 62 of file ../../sdk/lib/driver/devicetree/manager/manager.cc
zx::result<> Walk (Visitor & visitor)
This method does the following things -
* Does the initial walk of the tree and discovers devices/nodes.
* Calls |visitor.Visit()| for each node in the tree.
If |visitor.Visit()| returns something that's not `zx::ok()`, then this
will stop walking and return the error code.
This method can be called with the |DefaultVisitors| or with a collection
of visitors of user's choice.
Example:
DefaultVisitors
<
> visitors;
auto result = manager.Walk(visitors)
This needs to be called before |PublishDevices|.
Defined at line 97 of file ../../sdk/lib/driver/devicetree/manager/manager.cc
zx::result<> PublishDevices (PublisherInterface & publisher)
Defined at line 158 of file ../../sdk/lib/driver/devicetree/manager/manager.cc
zx::result<ReferenceNode> GetReferenceNode (Phandle id)
Returns node with phandle |id|.
Defined at line 176 of file ../../sdk/lib/driver/devicetree/manager/manager.cc
uint32_t GetPublishIndex (uint32_t node_id)
Returns index of the node in the publish list.
Defined at line 185 of file ../../sdk/lib/driver/devicetree/manager/manager.cc
zx::result<> ChangePublishOrder (uint32_t node_id, uint32_t new_index)
Moves the node with |node_id| to the |new_index| in the publish list.
Defined at line 195 of file ../../sdk/lib/driver/devicetree/manager/manager.cc
zx::result<> RegisterIommu (uint32_t iommu_id, fuchsia_hardware_platform_bus::Iommu iommu)
Registers an iommu with the platform bus.
Defined at line 209 of file ../../sdk/lib/driver/devicetree/manager/manager.cc
std::optional<Node *> FindNode (std::string_view name)
Find a node by its name.
Defined at line 217 of file ../../sdk/lib/driver/devicetree/manager/manager.cc