diff options
Diffstat (limited to 'share/man/man9/BUS_ADD_CHILD.9')
-rw-r--r-- | share/man/man9/BUS_ADD_CHILD.9 | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/share/man/man9/BUS_ADD_CHILD.9 b/share/man/man9/BUS_ADD_CHILD.9 index 8b69d5a..1e98ffe 100644 --- a/share/man/man9/BUS_ADD_CHILD.9 +++ b/share/man/man9/BUS_ADD_CHILD.9 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 13, 2004 +.Dd October 28, 2015 .Dt BUS_ADD_CHILD 9 .Os .Sh NAME @@ -44,6 +44,8 @@ The .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 .Xr device_add_child 9 for more details. @@ -53,18 +55,31 @@ however, the bus' .Fn BUS_ADD_CHILD is called. .Pp -Busses implementing +Buses implementing .Fn BUS_ADD_CHILD should insert the device into the tree using .Xr device_add_child 9 before adding things such as their own ivars and resource lists to the device. +.Fn BUS_ADD_CHILD +is not called by +.Xr device_add_child 9 . +.Fn BUS_ADD_CHILD +instead calls +.Xr device_add_child 9 . +.Pp +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 . .Sh RETURN VALUES The .Fn BUS_ADD_CHILD method returns .Vt device_t added to the tree, or -.Dv NULL . +.Dv NULL +to indicate failure. .Sh SEE ALSO .Xr device 9 , .Xr device_add_child 9 , |