Lines Matching defs:devclass

87 	TAILQ_ENTRY(driverlink) link;	/* list of drivers in devclass */
97 typedef TAILQ_HEAD(devclass_list, devclass) devclass_list_t;
101 struct devclass {
102 TAILQ_ENTRY(devclass) link;
103 devclass_t parent; /* parent in devclass hierarchy */
150 devclass_t devclass; /**< current device class */
179 #define DEVCLANAME(d) ((d)? d->name : "no devclass")
333 devclass_t dc = dev->devclass;
382 devclass_t dc = dev->devclass;
550 * If @p parentname is non-NULL, the parent of the devclass is set to
551 * the devclass of that name.
553 * @param classname the devclass name to find or create
554 * @param parentname the parent devclass name or @c NULL
555 * @param create non-zero to create a devclass
574 dc = malloc(sizeof(struct devclass) + strlen(classname) + 1,
589 * that this devclass will support drivers for the parent class as
610 * @param classname the devclass name to find or create
624 * @param classname the devclass name to find
633 * @brief Register that a device driver has been added to a devclass
635 * Register that a device driver has been added to a devclass. This
639 * the devclass.
641 * We do a full search here of the devclass list at each iteration
642 * level to save storing children-lists in the devclass structure. If
646 * @param dc the devclass to edit
666 * DC_HAS_CHILDREN flag when a child devclass is created on
690 * Add a device driver to a devclass. This is normally called
692 * all devices in the devclass will be called to allow them to attempt
695 * @param dc the devclass to edit
725 * devclass inherit from the devclass of the driver's
754 * @brief Register that a device driver has been deleted from a devclass
756 * Register that a device driver has been removed from a devclass.
760 * from any devices that are children of the bus's devclass. The function
763 * We do a full search here of the devclass list at each iteration
764 * level to save storing children-lists in the devclass structure. If
768 * @param busclass the devclass of the parent bus
769 * @param dc the devclass of the driver being deleted
781 * devices in the devclass of the driver and detach any which are
782 * using the driver and which have a parent in the devclass which
787 * the affected devclass.
796 dev->parent->devclass == busclass) {
813 * DC_HAS_CHILDREN flag when a child devclass is created on
833 * Delete a device driver from a devclass. This is normally called
841 * @param dc the devclass to edit
851 PDEBUG(("%s from devclass %s", driver->name, DEVCLANAME(busclass)));
889 * Quiesce a device driver from a devclass. This is normally called
896 * @param dc the devclass to edit
908 PDEBUG(("%s from devclass %s", driver->name, DEVCLANAME(busclass)));
929 * the devclass of the driver and quiesce any which are using
930 * the driver and which have a parent in the devclass which we
935 * devices in the affected devclass.
941 dev->parent->devclass == busclass) {
959 PDEBUG(("%s in devclass %s", classname, DEVCLANAME(dc)));
971 * @brief Return the name of the devclass
982 * @param dc the devclass to search
999 * @param dc the devclass to search
1019 * @brief Get a list of devices in the devclass
1021 * An array containing a list of all the devices in the given devclass
1026 * @param dc the devclass to examine
1060 * @brief Get a list of drivers in the devclass
1063 * given devclass is allocated and returned in @p *listp. The number
1067 * @param dc the devclass to examine
1101 * @brief Get the number of devices in a devclass
1103 * @param dc the devclass to examine
1118 * @brief Get the maximum unit number used in a devclass
1121 * @p dc is NULL, @c -1 is returned to indicate that not even the devclass has
1124 * @param dc the devclass to examine
1135 * @brief Find a free unit number in a devclass
1141 * @param dc the devclass to examine
1155 * @brief Set the parent of a devclass
1160 * @param dc the devclass to edit
1161 * @param pdc the new parent devclass
1170 * @brief Get the parent of a devclass
1172 * @param dc the devclass to examine
1199 * @param dc the devclass to allocate from
1214 PDEBUG(("unit %d in devclass %s", unit, DEVCLANAME(dc)));
1273 PDEBUG(("now: unit %d in devclass %s", unit, DEVCLANAME(dc)));
1281 * @brief Add a device to a devclass
1285 * devclass. This allows the device to be looked up by its unit
1288 * @param dc the devclass to add to
1301 PDEBUG(("%s in devclass %s", DEVICENAME(dev), DEVCLANAME(dc)));
1316 dev->devclass = dc;
1324 * @brief Delete a device from a devclass
1326 * The device is removed from the devclass's device list and its unit
1329 * @param dc the devclass to delete from
1340 PDEBUG(("%s in devclass %s", DEVICENAME(dev), DEVCLANAME(dc)));
1342 if (dev->devclass != dc || dc->devices[dev->unit] != dev)
1347 dev->devclass = NULL;
1359 * @param name the devclass name of the new device or @c NULL
1360 * to leave the devclass unspecified
1393 dev->devclass = NULL;
1450 * @param name devclass name for new device or @c NULL if not
1476 * @param name devclass name for new device or @c NULL if not
1558 if (child->devclass)
1559 devclass_delete_device(child->devclass, child);
1648 if (dev->devclass)
1649 return (devclass_find_driver_internal(dc, dev->devclass->name));
1659 if (dev->devclass) {
1662 if (!strcmp(dev->devclass->name, dl->driver->name))
1679 /* We should preserve the devclass (or lack of) set by the bus. */
1680 int hasclass = (child->devclass != NULL);
1684 dc = dev->devclass;
1686 panic("device_probe_child: parent device has no devclass");
1716 "devclass (class: %s "
1741 /* Reset flags and devclass before the next probe. */
1788 * If we found a driver, change state and initialise the devclass.
1789 * Set the winning driver, devclass, and flags.
1794 if (!child->devclass) {
1891 * @brief Return the current devclass for the device or @c NULL if
1897 return (dev->devclass);
1901 * @brief Return the name of the device's devclass or @c NULL if there
1907 if (dev != NULL && dev->devclass)
1908 return (devclass_get_name(dev->devclass));
1913 * @brief Return a string containing the device's devclass name
2383 * @brief Set the devclass of a device
2393 if (dev->devclass)
2394 devclass_delete_device(dev->devclass, dev);
2398 if (dev->devclass) {
2414 * @brief Set the devclass of a device and mark the devclass fixed.
2433 * @brief Query the device to determine if it's of a fixed devclass
2504 * the parent device's devclass. If the device was originally created
2506 * with that name are probed, otherwise all drivers in the devclass
2508 * parent devclass, the search continues in the parent of that
2509 * devclass (see devclass_get_parent()) if any.
2596 * the devclass to reserve the name and unit.
2636 devclass_delete_device(dev->devclass, dev);
2708 devclass_delete_device(dev->devclass, dev);
3407 * devclass.
3428 devclass_t dc = dev->devclass;
3916 dc = dev->devclass;
5392 print_devclass_short(dev->devclass, indent+1);
5462 indentprintf(("devclass %s: max units = %d\n", dc->name, dc->maxunit));
5675 for (dc = bus->devclass; dc != NULL; dc = dc->parent) {
5826 if (dev->devclass != NULL) {
5831 if (resource_disabled(dev->devclass->name, dev->unit))
5832 resource_unset_value(dev->devclass->name,
5837 devclass_delete_device(dev->devclass, dev);
5898 if (dev->devclass != NULL &&
5899 strcmp(driver, dev->devclass->name) == 0)
5933 devclass_delete_device(dev->devclass, dev);
5961 devclass_delete_device(dev->devclass, dev);
6337 db_printf(" class: %s\n", DEVCLANAME(dev->devclass));