Copyright (c) 2004 M. Warner Losh. All rights reserved. This program is free software. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaime...
NAMEBUS_ADD_CHILD - add a device node to the tree with a given priority
SYNOPSISIn sys/param.h In sys/bus.h Ft int Fn BUS_ADD_CHILD device_t dev int order const char *name int unit
DESCRIPTIONThe Fn BUS_ADD_CHILD method is used by the driver identify routine to add devices to the tree. It can also be used to add children to buses that implement this routine in other contexts, although the behavior is bus specific. Please see device_add_child9 for more details. The interface is the same as device_add_child9 however, the bus' Fn BUS_ADD_CHILD is called.
Buses implementing Fn BUS_ADD_CHILD should insert the device into the tree using device_add_child9 before adding things such as their own ivars and resource lists to the device. Fn BUS_ADD_CHILD is not called by device_add_child9. Fn BUS_ADD_CHILD instead calls device_add_child9.
A panic will result when called for a bus that does not implement Fn BUS_ADD_CHILD . Some buses require a special bus-specific routine to be called instead of Fn BUS_ADD_CHILD .