Lines Matching refs:the

4 See the kerneldoc for the struct device_driver.
12 device_driver represents the driver as a whole (not a particular
18 The driver must initialize at least the name and bus fields. It should
19 also initialize the devclass field (when it arrives), so it may obtain
20 the proper linkage internally. It should also initialize as many of
21 the callbacks as possible, though each is optional.
27 allocated. Below is an example declaration of the eepro100
28 driver. This declaration is hypothetical only; it relies on the driver
29 being converted completely to the new model.
41 Most drivers will not be able to be converted completely to the new
42 model because the bus they belong to has a bus-specific structure with
47 of these structures and the semantics for comparing device IDs are
52 the definition of the bus-specific driver. Like this:
60 (using the eepro100 driver again):
74 Some may find the syntax of embedded struct initialization awkward or
75 even a bit ugly. So far, it's the best way we've found to do what we want...
82 The driver registers the structure on startup. For drivers that have
88 need to register with the bus using something like pci_driver_register.
91 possible. Registration with the core initializes several fields in the
92 struct device_driver object, including the reference count and the
94 used by the device model core or the bus driver.
100 By defining wrapper functions, the transition to the new model can be
101 made easier. Drivers can ignore the generic structure altogether and
102 let the bus wrapper fill in the fields. For the callbacks, the bus can
103 define generic callbacks that forward the call to the bus-specific
104 callbacks of the drivers.
107 information in the driver, the drivers must be modified anyway. Since
108 converting drivers to the new model should reduce some infrastructural
115 Once the object has been registered, it may access the common fields of
116 the object, like the lock and the list of devices.
121 The devices field is a list of all the devices that have been bound to
122 the driver. The LDM core provides a helper function to operate on all
123 the devices a driver controls. This helper locks the driver on each
132 bus's directory. In this directory, the driver can export an interface
133 to userspace to control operation of the driver on a global basis;
134 e.g. toggling debugging output in the driver.
137 directory will contain symlinks to the directories of devices it
147 The probe() entry is called in task context, with the bus's rwsem locked
148 and the driver partially bound to the device. Drivers commonly use
152 addition to dev->platform_data to initialize the driver.
154 This callback holds the driver-specific logic to bind the driver to a
155 given device. That includes verifying that the device is present, that
156 it's a version the driver can handle, that driver data structures can
159 When the driver has successfully bound itself to that device, then probe()
160 returns zero and the driver model code will finish its part of binding
161 the driver to that device.
164 the driver did not bind to this device, in which case it should have
170 called if a device is physically removed from the system, if the
174 It is up to the driver to determine if the device is present or
175 not. It should free any resources allocated specifically for the
176 device; i.e. anything in the device's driver_data field.
178 If the device is still present, it should quiesce the device and place
183 suspend is called to put the device in a low power state.
200 identically to the DEVICE_ATTR macro.
210 This can then be used to add and remove the attribute from the