Lines Matching refs:driver

3  * drivers/base/dd.c - The core device/driver interactions.
7 * driver binding and unbinding.
38 * Sometimes driver probe order matters, but the kernel doesn't always have
40 * resource it depends on is available. For example, an SDHCI driver may
42 * initialized. If a required resource is not available yet, a driver can
46 * list. A driver returning -EPROBE_DEFER causes the device to be added to the
47 * pending list. A successful driver probe will trigger moving all devices
162 * should be called anytime a driver is successfully bound to a device.
171 * trigger has occurred in the midst of probing a driver. If the trigger count
291 dev_warn(dev, "ignoring dependency for device, assuming no driver\n");
384 * device_is_bound() - Check if device is bound to a driver
388 * against a driver.
405 pr_debug("driver: '%s': %s: bound to device '%s'\n", dev->driver->name,
408 klist_add_tail(&dev->p->knode_driver, &dev->driver->p->klist_devices);
428 dev->driver->coredump(dev);
441 ret = sysfs_create_link(&dev->driver->p->kobj, &dev->kobj,
446 ret = sysfs_create_link(&dev->kobj, &dev->driver->p->kobj,
447 "driver");
451 if (!IS_ENABLED(CONFIG_DEV_COREDUMP) || !dev->driver->coredump)
458 sysfs_remove_link(&dev->kobj, "driver");
461 sysfs_remove_link(&dev->driver->p->kobj,
470 struct device_driver *drv = dev->driver;
476 sysfs_remove_link(&dev->kobj, "driver");
481 * device_bind_driver - bind a driver to one device.
484 * Allow manual attachment of a driver to a device.
485 * Caller must have already set @dev->driver.
489 * (It is ok to call with no other effort from a driver's probe() method.)
553 dev->driver = NULL;
564 device_remove_groups(dev, dev->driver->dev_groups);
568 else if (dev->driver->remove)
569 dev->driver->remove(dev);
594 /* driver matched but the probe failed */
623 pr_debug("bus: '%s': %s: probing driver %s with device %s\n",
632 dev->driver = drv;
663 * suppliers have probed. So, treat this as if the driver
709 pr_debug("bus: '%s': %s: bound device %s to driver %s\n",
730 * For initcall_debug, show the driver probe time.
785 if (dev->driver)
789 pr_debug("bus: '%s': %s: matched device %s with driver %s\n",
811 * driver_probe_device - attempt to bind device & driver together
812 * @drv: driver to bind a device to
813 * @dev: device to try to bind to the driver
816 * already has a driver, 0 if the device is bound successfully and a positive
822 * If the device has a parent, runtime-resume the parent before driver probing.
859 pr_warn("Too long list of driver names for 'driver_async_probe'!\n");
893 * not. Only initial binding after device or driver registration
905 * most likely because there was no driver requiring synchronous
906 * probing - and we found asynchronous driver during first pass).
908 * probe for given device and driver from bus_for_each_drv() since
909 * driver pointer is not guaranteed to stay valid once
910 * bus_for_each_drv() iterates to the next driver on the bus.
916 * driver, we'll encounter one that requests asynchronous probing.
937 * Device can't match with a driver right now, so don't attempt
955 * Ignore errors returned by ->probe so that the next driver can try
977 * happen with driver loading, device discovery/registration,
981 if (dev->p->dead || dev->driver)
1008 } else if (dev->driver) {
1017 dev->driver = NULL;
1034 * If we could not find appropriate driver
1058 * device_attach - try to attach device to a driver.
1065 * Returns 1 if the device was bound to a driver;
1066 * 0 if no matching driver was found;
1084 * @dev: Device we will update driver info for
1100 * @dev: Device we will update driver info for
1115 * device_driver_attach - attach a specific driver to a specific device
1119 * Manually attach driver to a device. Will acquire both @dev lock and
1151 dev_dbg(dev, "driver %s async attach completed: %d\n", drv->name, ret);
1200 * that the dev->driver and async_driver fields are protected
1202 dev_dbg(dev, "probing driver %s asynchronously\n", drv->name);
1204 if (!dev->driver && !dev->p->async_driver) {
1223 * driver_attach - try to bind driver to devices.
1224 * @drv: driver.
1227 * match the driver with each one. If driver_probe_device()
1228 * returns 0 and the @dev->driver is set, we've found a
1245 drv = dev->driver;
1257 * have released the driver successfully while this one
1260 if (dev->driver != drv) {
1294 if (!drv || drv == dev->driver)
1301 * device_release_driver - manually detach device from driver.
1304 * Manually detach device from driver.
1323 * device_driver_detach - detach driver from a specific device
1324 * @dev: device to detach driver from
1326 * Detach driver from device. Will acquire both @dev lock and @dev->parent
1335 * driver_detach - detach driver from all devices it controls.
1336 * @drv: driver.