class PciChildVisitor
Defined at line 55 of file ../../sdk/lib/driver/devicetree/visitors/drivers/pci/pci-child-visitor/pci-child-visitor.h
Visits PCI bus nodes (those with `device_type = "pci"`) and wires each of
their children to the PCI device that the PCI bus driver discovers at the
child's bus/device/function (BDF) address.
Unlike the host-controller visitor (//sdk/lib/driver/devicetree/visitors/
drivers/pci), which parses the controller's own resources, this visitor is
controller agnostic: it only needs the standard `device_type = "pci"` marker
and the children's `reg` BDF encoding, so it works for any PCI bus (including
PCI-to-PCI bridges, which also carry `device_type = "pci"`).
For each child it adds a composite node spec parent that accepts the PCI bus
driver's per-device fragment, identified by its PCI topology (BDF). The
child's other devicetree resources (gpios, regulators, clocks, ...) are added
as additional parents by their respective visitors, so the resulting
composite gives the child driver access to its sideband resources alongside
the PCI bus.
Public Methods
zx::result<> Visit (fdf_devicetree::Node & node, const devicetree::PropertyDecoder & decoder)
Defined at line 34 of file ../../sdk/lib/driver/devicetree/visitors/drivers/pci/pci-child-visitor/pci-child-visitor.cc
zx::result<> FinalizeNode (fdf_devicetree::Node & node)
Defined at line 62 of file ../../sdk/lib/driver/devicetree/visitors/drivers/pci/pci-child-visitor/pci-child-visitor.cc
const std::vector<PciChildBdf> & child_bdfs ()
The BDFs of every PCI child this visitor wired up. A board driver passes
these to the PCI bus driver (via PciPlatformInfo.devicetree_bdfs) so the bus
driver publishes only the fragment for these devices and lets this visitor's
composite take over.
Defined at line 66 of file ../../sdk/lib/driver/devicetree/visitors/drivers/pci/pci-child-visitor/pci-child-visitor.h