class Manager
Defined at line 22 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 55 of file ../../sdk/lib/driver/devicetree/manager/manager.h
zx::result<Manager> CreateFromNamespace (fdf::Namespace & ns)
Defined at line 56 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 90 of file ../../sdk/lib/driver/devicetree/manager/manager.cc
zx::result<> PublishDevices (fdf::WireSyncClient<fuchsia_hardware_platform_bus::PlatformBus> & pbus_client, fidl::ClientEnd<fuchsia_driver_framework::CompositeNodeManager> mgr, fidl::SyncClient<fuchsia_driver_framework::Node> & fdf_node)
Publish the discovered devices.
The devices maybe added as a platform device using |pbus_client| if it contains any platform
resources, or it maybe added as a child of the board driver using |fdf_node|, or it maybe added
as a composite of multiple devices if it references other nodes.
Defined at line 151 of file ../../sdk/lib/driver/devicetree/manager/manager.cc
zx::result<ReferenceNode> GetReferenceNode (Phandle id)
Returns node with phandle |id|.
Defined at line 181 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 190 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 200 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 214 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 222 of file ../../sdk/lib/driver/devicetree/manager/manager.cc