Lines Matching defs:devclass
51 TAILQ_ENTRY(driverlink) link; /* list of drivers in devclass */
59 typedef TAILQ_HEAD(devclass_list, devclass) devclass_list_t;
63 struct devclass {
64 TAILQ_ENTRY(devclass) link;
65 devclass_t parent; /* parent in devclass hierarchy */
96 devclass_t devclass; /**< current device class */
117 #define DEVCLANAME(d) ((d)? d->name : "no devclass")
174 * @brief Return the name of the device's devclass or @c NULL if there
180 if (dev != NULL && dev->devclass)
181 return (devclass_get_name(dev->devclass));
279 * If @p parentname is non-NULL, the parent of the devclass is set to
280 * the devclass of that name.
282 * @param classname the devclass name to find or create
283 * @param parentname the parent devclass name or @c NULL
284 * @param create non-zero to create a devclass
302 dc = bsd_malloc(sizeof(struct devclass) + strlen(classname) + 1,
321 * that this devclass will support drivers for the parent class as
346 * @param classname the devclass name to find or create
360 * @param classname the devclass name to find
369 * @brief Register that a device driver has been added to a devclass
371 * Register that a device driver has been added to a devclass. This
375 * the devclass.
377 * We do a full search here of the devclass list at each iteration
378 * level to save storing children-lists in the devclass structure. If
382 * @param dc the devclass to edit
402 * DC_HAS_CHILDREN flag when a child devclass is created on
418 * Add a device driver to a devclass. This is normally called
420 * all devices in the devclass will be called to allow them to attempt
423 * @param dc the devclass to edit
452 * devclass inherit from the devclass of the driver's
476 * @brief Register that a device driver has been deleted from a devclass
478 * Register that a device driver has been removed from a devclass.
482 * from any devices that are children of the bus's devclass. The function
485 * We do a full search here of the devclass list at each iteration
486 * level to save storing children-lists in the devclass structure. If
490 * @param busclass the devclass of the parent bus
491 * @param dc the devclass of the driver being deleted
503 * devices in the devclass of the driver and detach any which are
504 * using the driver and which have a parent in the devclass which
509 * the affected devclass.
515 dev->parent->devclass == busclass) {
529 * DC_HAS_CHILDREN flag when a child devclass is created on
549 * Delete a device driver from a devclass. This is normally called
557 * @param dc the devclass to edit
567 PDEBUG(("%s from devclass %s", driver->name, DEVCLANAME(busclass)));
605 * Quiesce a device driver from a devclass. This is normally called
612 * @param dc the devclass to edit
624 PDEBUG(("%s from devclass %s", driver->name, DEVCLANAME(busclass)));
645 * the devclass of the driver and quiesce any which are using
646 * the driver and which have a parent in the devclass which we
651 * devices in the affected devclass.
657 dev->parent->devclass == busclass) {
675 PDEBUG(("%s in devclass %s", classname, DEVCLANAME(dc)));
687 * @brief Return the name of the devclass
698 * @param dc the devclass to search
715 * @param dc the devclass to search
735 * @brief Get a list of devices in the devclass
737 * An array containing a list of all the devices in the given devclass
742 * @param dc the devclass to examine
776 * @brief Get a list of drivers in the devclass
779 * given devclass is allocated and returned in @p *listp. The number
783 * @param dc the devclass to examine
817 * @brief Get the number of devices in a devclass
819 * @param dc the devclass to examine
834 * @brief Get the maximum unit number used in a devclass
838 * that not even the devclass has been allocated yet.
840 * @param dc the devclass to examine
851 * @brief Find a free unit number in a devclass
856 * @param dc the devclass to examine
870 * @brief Set the parent of a devclass
875 * @param dc the devclass to edit
876 * @param pdc the new parent devclass
885 * @brief Get the parent of a devclass
887 * @param dc the devclass to examine
902 * @param dc the devclass to allocate from
915 PDEBUG(("unit %d in devclass %s", unit, DEVCLANAME(dc)));
940 PDEBUG(("mid: unit %d in devclass %s", unit, DEVCLANAME(dc)));
967 PDEBUG(("now: unit %d in devclass %s", unit, DEVCLANAME(dc)));
1248 * @brief Return a string containing the device's devclass name
1260 * @brief Add a device to a devclass
1264 * devclass. This allows the device to be looked up by its unit
1267 * @param dc the devclass to add to
1279 PDEBUG(("%s in devclass %s", DEVICENAME(dev), DEVCLANAME(dc)));
1294 dev->devclass = dc;
1307 * @brief Delete a device from a devclass
1309 * The device is removed from the devclass's device list and its unit
1312 * @param dc the devclass to delete from
1323 PDEBUG(("%s in devclass %s", DEVICENAME(dev), DEVCLANAME(dc)));
1325 if (dev->devclass != dc || dc->devices[dev->unit] != dev)
1330 dev->devclass = NULL;
1342 * @param name the devclass name of the new device or @c NULL
1343 * to leave the devclass unspecified
1376 dev->devclass = NULL;
1432 * @param name devclass name for new device or @c NULL if not
1472 * @param name devclass name for new device or @c NULL if not
1552 if (child->devclass)
1553 devclass_delete_device(child->devclass, child);
1665 devclass_delete_device(dev->devclass, dev);
1709 * the parent device's devclass. If the device was originally created
1711 * with that name are probed, otherwise all drivers in the devclass
1713 * parent devclass, the search continues in the parent of that
1714 * devclass (see devclass_get_parent()) if any.
1813 * devclass.
1818 devclass_t dc = dev->devclass;
2118 dc = dev->devclass;
2238 if (dev->devclass)
2239 return (devclass_find_driver_internal(dc, dev->devclass->name));
2249 if (dev->devclass) {
2252 if (!strcmp(dev->devclass->name, dl->driver->name))
2261 * @brief Set the devclass of a device
2271 if (dev->devclass)
2272 devclass_delete_device(dev->devclass, dev);
2276 if (dev->devclass) {
2337 devclass_delete_device(dev->devclass, dev);
2429 int hasclass = (child->devclass != NULL);
2433 dc = dev->devclass;
2435 panic("device_probe_child: parent device has no devclass");
2466 "devclass (class: %s "
2481 /* Reset flags and devclass before the next probe. */
2534 * If we have an unambiguous match in this devclass,
2542 * If we found a driver, change state and initialise the devclass.
2568 /* Set the winning driver, devclass, and flags. */
2569 if (!child->devclass) {
2604 * @brief Return the current devclass for the device or @c NULL if
2610 return (dev->devclass);
2919 print_devclass_short(dev->devclass, indent+1);
2989 indentprintf(("devclass %s: max units = %d\n", dc->name, dc->maxunit));