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
155 * should be called anytime a driver is successfully bound to a device.
164 * trigger has occurred in the midst of probing a driver. If the trigger count
280 dev_warn(dev, "ignoring dependency for device, assuming no driver\n");
347 * device_is_bound() - Check if device is bound to a driver
351 * against a driver.
368 pr_debug("driver: '%s': %s: bound to device '%s'\n", dev->driver->name,
371 klist_add_tail(&dev->p->knode_driver, &dev->driver->p->klist_devices);
394 dev->driver->coredump(dev);
409 ret = sysfs_create_link(&dev->driver->p->kobj, &dev->kobj,
414 ret = sysfs_create_link(&dev->kobj, &dev->driver->p->kobj,
415 "driver");
419 if (!IS_ENABLED(CONFIG_DEV_COREDUMP) || !dev->driver->coredump ||
423 sysfs_remove_link(&dev->kobj, "driver");
426 sysfs_remove_link(&dev->driver->p->kobj,
435 struct device_driver *drv = dev->driver;
441 sysfs_remove_link(&dev->kobj, "driver");
446 * device_bind_driver - bind a driver to one device.
449 * Allow manual attachment of a driver to a device.
450 * Caller must have already set @dev->driver.
454 * (It is ok to call with no other effort from a driver's probe() method.)
522 pr_debug("bus: '%s': %s: probing driver %s with device %s\n",
531 dev->driver = drv;
597 dev->driver = NULL;
613 pr_debug("bus: '%s': %s: bound device %s to driver %s\n",
635 dev->driver = NULL;
654 /* driver matched but the probe failed */
659 * Ignore errors returned by ->probe so that the next driver can try
670 * For initcall_debug, show the driver probe time.
722 * driver_probe_device - attempt to bind device & driver together
723 * @drv: driver to bind a device to
724 * @dev: device to try to bind to the driver
732 * If the device has a parent, runtime-resume the parent before driver probing.
741 pr_debug("bus: '%s': %s: matched device %s with driver %s\n",
771 pr_warn("Too long list of driver names for 'driver_async_probe'!\n");
803 * not. Only initial binding after device or driver registration
815 * most likely because there was no driver requiring synchronous
816 * probing - and we found asynchronous driver during first pass).
818 * probe for given device and driver from bus_for_each_drv() since
819 * driver pointer is not guaranteed to stay valid once
820 * bus_for_each_drv() iterates to the next driver on the bus.
826 * driver, we'll encounter one that requests asynchronous probing.
846 * Device can't match with a driver right now, so don't attempt
879 * happen with driver loading, device discovery/registration,
883 if (dev->p->dead || dev->driver)
910 } else if (dev->driver) {
919 dev->driver = NULL;
936 * If we could not find appropriate driver
960 * device_attach - try to attach device to a driver.
967 * Returns 1 if the device was bound to a driver;
968 * 0 if no matching driver was found;
986 * @dev: Device we will update driver info for
1002 * @dev: Device we will update driver info for
1017 * device_driver_attach - attach a specific driver to a specific device
1021 * Manually attach driver to a device. Will acquire both @dev lock and
1032 * bound a driver before us just skip the driver probe call.
1034 if (!dev->p->dead && !dev->driver)
1054 * bound a driver before us just skip the driver probe call.
1056 if (!dev->p->dead && !dev->driver)
1061 dev_dbg(dev, "driver %s async attach completed: %d\n", drv->name, ret);
1109 * that the dev->driver and async_driver fields are protected
1111 dev_dbg(dev, "probing driver %s asynchronously\n", drv->name);
1113 if (!dev->driver) {
1130 * driver_attach - try to bind driver to devices.
1131 * @drv: driver.
1134 * match the driver with each one. If driver_probe_device()
1135 * returns 0 and the @dev->driver is set, we've found a
1152 drv = dev->driver;
1164 * have released the driver successfully while this one
1167 if (dev->driver != drv) {
1194 dev->driver = NULL;
1220 if (!drv || drv == dev->driver)
1227 * device_release_driver - manually detach device from driver.
1230 * Manually detach device from driver.
1249 * device_driver_detach - detach driver from a specific device
1250 * @dev: device to detach driver from
1252 * Detach driver from device. Will acquire both @dev lock and @dev->parent
1261 * driver_detach - detach driver from all devices it controls.
1262 * @drv: driver.