Linux Kernel
3.7.1
|
#include <linux/device.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/kthread.h>
#include <linux/wait.h>
#include <linux/async.h>
#include <linux/pm_runtime.h>
#include "base.h"
#include "power/power.h"
Go to the source code of this file.
Functions | |
void | driver_deferred_probe_del (struct device *dev) |
late_initcall (deferred_probe_initcall) | |
int | device_bind_driver (struct device *dev) |
EXPORT_SYMBOL_GPL (device_bind_driver) | |
int | driver_probe_done (void) |
void | wait_for_device_probe (void) |
EXPORT_SYMBOL_GPL (wait_for_device_probe) | |
int | driver_probe_device (struct device_driver *drv, struct device *dev) |
int | device_attach (struct device *dev) |
EXPORT_SYMBOL_GPL (device_attach) | |
int | driver_attach (struct device_driver *drv) |
EXPORT_SYMBOL_GPL (driver_attach) | |
void | device_release_driver (struct device *dev) |
EXPORT_SYMBOL_GPL (device_release_driver) | |
void | driver_detach (struct device_driver *drv) |
void * | dev_get_drvdata (const struct device *dev) |
EXPORT_SYMBOL (dev_get_drvdata) | |
int | dev_set_drvdata (struct device *dev, void *data) |
EXPORT_SYMBOL (dev_set_drvdata) | |
device_attach - try to attach device to a driver. : device.
Walk the list of drivers that the bus has and call driver_probe_device() for each pair. If a compatible pair is found, break out and return.
Returns 1 if the device was bound to a driver; 0 if no matching driver was found; -ENODEV if the device is not registered.
When called for a USB interface, ->parent lock must be held.
device_bind_driver - bind a driver to one device. : device.
Allow manual attachment of a driver to a device. Caller must have already set ->driver.
Note that this does not modify the bus reference count nor take the bus's rwsem. Please verify those are accounted for before calling this. (It is ok to call with no other effort from a driver's probe() method.)
This function must be called with the device lock held.
int driver_attach | ( | struct device_driver * | drv | ) |
void driver_detach | ( | struct device_driver * | drv | ) |
int driver_probe_device | ( | struct device_driver * | drv, |
struct device * | dev | ||
) |
driver_probe_device - attempt to bind device & driver together : driver to bind a device to : device to try to bind to the driver
This function returns -ENODEV if the device is not registered, 1 if the device is bound successfully and 0 otherwise.
This function must be called with lock held. When called for a USB interface, ->parent lock must be held as well.
EXPORT_SYMBOL | ( | dev_get_drvdata | ) |
EXPORT_SYMBOL | ( | dev_set_drvdata | ) |
EXPORT_SYMBOL_GPL | ( | device_bind_driver | ) |
EXPORT_SYMBOL_GPL | ( | wait_for_device_probe | ) |
EXPORT_SYMBOL_GPL | ( | device_attach | ) |
EXPORT_SYMBOL_GPL | ( | driver_attach | ) |
EXPORT_SYMBOL_GPL | ( | device_release_driver | ) |
late_initcall | ( | deferred_probe_initcall | ) |