Loading libBSD driver modules

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Jul 22 05:00:32 UTC 2019


Hello Nils,

yes, you can add devices after initialization. For example:

int
my_attach(void)
{
         device_t dev;
         device_t child;

         dev = device_find_child(root_bus, "nexus", 0);
         if (dev == NULL) {
                 return ENXIO;
         }

         child = device_add_child(dev, "mydevice", -1);
         if (child == NULL) {
                 return ENXIO;
         }

         return device_probe_and_attach(child);
}

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list