DEVICE_ATTACH(9)

HOME || NAME SYNOPSIS DESCRIPTION RETURN VALUES SEE ALSO AUTHORS
NAME
     DEVICE_ATTACH -- attach a device
SYNOPSIS
     #include <sys/param.h>
     #include <sys/bus.h>

     int
     DEVICE_ATTACH(device_t dev);
DESCRIPTION
     Attach a device to the system.  The probe method will have been called
     and will have indicated that the device exists.  This routine should ini-
     tialise the hardware and allocate other system resources (such as devfs
     entries).

     Devices which implement busses should use this method to probe for the
     existence of devices attached to the bus and add them as children.  If
     this is combined with the use of bus_generic_attach(9) the child devices
     will be automatically probed and attached.
RETURN VALUES
     Zero is returned on success, otherwise an appropriate error is returned.
SEE ALSO
     device(9), DEVICE_DETACH(9), DEVICE_IDENTIFY(9), DEVICE_PROBE(9),
     DEVICE_SHUTDOWN(9)
AUTHORS
     This man page was written by Doug Rabson.