logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

DEVICE_ATTACH — attach a device

Authors

       This manual page was written by Doug Rabson <dfr@FreeBSD.org>.

Debian                                          January 15, 2017                                DEVICE_ATTACH(9)

Description

       Attach  a device to the system after the DEVICE_PROBE() method has been called and has indicated that the
       device exists.  The DEVICE_ATTACH() method should initialize  the  hardware  and  allocate  other  system
       resources (such as devfs(5) entries).

       Devices  which  implement  buses 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.

Name

       DEVICE_ATTACH — attach a device

Return Values

       Zero is returned on success, otherwise an appropriate error is returned.

See Also

devfs(5), device(9), DEVICE_DETACH(9), DEVICE_IDENTIFY(9), DEVICE_PROBE(9), DEVICE_SHUTDOWN(9)

Synopsis

#include<sys/param.h>#include<sys/bus.h>intDEVICE_ATTACH(device_tdev);

See Also