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.
404 dev_dbg(dev, "driver: '%s': %s: bound to device\n", dev->driver->name,
407 klist_add_tail(&dev->p->knode_driver, &dev->driver->p->klist_devices);
427 dev->driver->coredump(dev);
440 ret = sysfs_create_link(&dev->driver->p->kobj, &dev->kobj,
445 ret = sysfs_create_link(&dev->kobj, &dev->driver->p->kobj,
446 "driver");
450 if (!IS_ENABLED(CONFIG_DEV_COREDUMP) || !dev->driver->coredump)
457 sysfs_remove_link(&dev->kobj, "driver");
460 sysfs_remove_link(&dev->driver->p->kobj,
469 struct device_driver *drv = dev->driver;
475 sysfs_remove_link(&dev->kobj, "driver");
480 * device_bind_driver - bind a driver to one device.
483 * Allow manual attachment of a driver to a device.
484 * Caller must have already set @dev->driver.
488 * (It is ok to call with no other effort from a driver's probe() method.)
552 dev->driver = NULL;
563 device_remove_groups(dev, dev->driver->dev_groups);
567 else if (dev->driver->remove)
568 dev->driver->remove(dev);
589 dev_dbg(dev, "probe with driver %s rejects match %d\n",
593 /* driver matched but the probe failed */
594 dev_err(dev, "probe with driver %s failed with error %d\n",
622 dev_dbg(dev, "bus: '%s': %s: probing driver %s with device\n",
631 dev->driver = drv;
661 * suppliers have probed. So, treat this as if the driver
707 dev_dbg(dev, "bus: '%s': %s: bound device to driver %s\n",
728 * For initcall_debug, show the driver probe time.
783 if (dev->driver)
787 dev_dbg(dev, "bus: '%s': %s: matched device with driver %s\n",
809 * driver_probe_device - attempt to bind device & driver together
810 * @drv: driver to bind a device to
811 * @dev: device to try to bind to the driver
814 * already has a driver, 0 if the device is bound successfully and a positive
820 * If the device has a parent, runtime-resume the parent before driver probing.
857 pr_warn("Too long list of driver names for 'driver_async_probe'!\n");
891 * not. Only initial binding after device or driver registration
903 * most likely because there was no driver requiring synchronous
904 * probing - and we found asynchronous driver during first pass).
906 * probe for given device and driver from bus_for_each_drv() since
907 * driver pointer is not guaranteed to stay valid once
908 * bus_for_each_drv() iterates to the next driver on the bus.
914 * driver, we'll encounter one that requests asynchronous probing.
935 * Device can't match with a driver right now, so don't attempt
953 * Ignore errors returned by ->probe so that the next driver can try
975 * happen with driver loading, device discovery/registration,
979 if (dev->p->dead || dev->driver)
1006 } else if (dev->driver) {
1015 dev->driver = NULL;
1032 * If we could not find appropriate driver
1056 * device_attach - try to attach device to a driver.
1063 * Returns 1 if the device was bound to a driver;
1064 * 0 if no matching driver was found;
1082 * @dev: Device we will update driver info for
1098 * @dev: Device we will update driver info for
1113 * device_driver_attach - attach a specific driver to a specific device
1117 * Manually attach driver to a device. Will acquire both @dev lock and
1149 dev_dbg(dev, "driver %s async attach completed: %d\n", drv->name, ret);
1198 * that the dev->driver and async_driver fields are protected
1200 dev_dbg(dev, "probing driver %s asynchronously\n", drv->name);
1202 if (!dev->driver && !dev->p->async_driver) {
1221 * driver_attach - try to bind driver to devices.
1222 * @drv: driver.
1225 * match the driver with each one. If driver_probe_device()
1226 * returns 0 and the @dev->driver is set, we've found a
1243 drv = dev->driver;
1255 * have released the driver successfully while this one
1258 if (dev->driver != drv) {
1292 if (!drv || drv == dev->driver)
1299 * device_release_driver - manually detach device from driver.
1302 * Manually detach device from driver.
1321 * device_driver_detach - detach driver from a specific device
1322 * @dev: device to detach driver from
1324 * Detach driver from device. Will acquire both @dev lock and @dev->parent
1333 * driver_detach - detach driver from all devices it controls.
1334 * @drv: driver.