1STRUCT DEVICE_DRIVER(9)  Device drivers infrastructure STRUCT DEVICE_DRIVER(9)
2
3
4

NAME

6       struct_device_driver - The basic device driver structure
7

SYNOPSIS

9       struct device_driver {
10         const char * name;
11         struct bus_type * bus;
12         struct module * owner;
13         const char * mod_name;
14         bool suppress_bind_attrs;
15         const struct of_device_id * of_match_table;
16         const struct acpi_device_id * acpi_match_table;
17         int (* probe) (struct device *dev);
18         int (* remove) (struct device *dev);
19         void (* shutdown) (struct device *dev);
20         int (* suspend) (struct device *dev, pm_message_t state);
21         int (* resume) (struct device *dev);
22         const struct attribute_group ** groups;
23         const struct dev_pm_ops * pm;
24         struct driver_private * p;
25       };
26

MEMBERS

28       name
29           Name of the device driver.
30
31       bus
32           The bus which the device of this driver belongs to.
33
34       owner
35           The module owner.
36
37       mod_name
38           Used for built-in modules.
39
40       suppress_bind_attrs
41           Disables bind/unbind via sysfs.
42
43       of_match_table
44           The open firmware table.
45
46       acpi_match_table
47           The ACPI match table.
48
49       probe
50           Called to query the existence of a specific device, whether this
51           driver can work with it, and bind the driver to a specific device.
52
53       remove
54           Called when the device is removed from the system to unbind a
55           device from this driver.
56
57       shutdown
58           Called at shut-down time to quiesce the device.
59
60       suspend
61           Called to put the device to sleep mode. Usually to a low power
62           state.
63
64       resume
65           Called to bring a device from sleep mode.
66
67       groups
68           Default attributes that get created by the driver core
69           automatically.
70
71       pm
72           Power management operations of the device which matched this
73           driver.
74
75       p
76           Driver core's private data, no one other than the driver core can
77           touch this.
78

DESCRIPTION

80       The device driver-model tracks all of the drivers known to the system.
81       The main reason for this tracking is to enable the driver core to match
82       up drivers with new devices. Once drivers are known objects within the
83       system, however, a number of other things become possible. Device
84       drivers can export information and configuration variables that are
85       independent of any specific device.
86
88Kernel Hackers Manual 3.10         June 2019           STRUCT DEVICE_DRIVER(9)
Impressum