|
NAME
SYNOPSIS
int
device_t
phandle_t
DESCRIPTIONWhen a device tree node references another node, the driver may need to get a device_t instance associated with the referenced node. For instance, an Ethernet driver accessing a PHY device. To make this possible, the kernel maintains a table that maps effective handles to device_t instances.
EXAMPLES static int
acmephy_attach(device_t dev)
{
phandle_t node;
/* PHY node is referenced from eth device, register it */
node = ofw_bus_get_node(dev);
OF_device_register_xref(OF_xref_from_node(node), dev);
return (0);
}
SEE ALSOAUTHORSThis manual page was written by Oleksandr Tymoshenko <gonzo@FreeBSD.org>.
|