• Home
  • Raw
  • Download

Lines Matching refs:device

33 Step 0: Read include/linux/device.h for object and function definitions. 
91 struct device represents a single device. It mainly contains metadata
92 describing the relationship the device has to other entities.
95 - Embed a struct device in the bus-specific device type.
100 struct device dev; /* Generic device interface */
104 It is recommended that the generic device not be the first item in
123 - Initialize the device on registration.
126 bus driver should initialize the generic device. The most important
129 The bus_id is an ASCII string that contains the device's address on
133 parent is the physical parent of the device. It is important that
142 Also, the location of the device's sysfs directory depends on a
143 device's parent. sysfs exports a directory structure that mirrors
144 the device hierarchy. Accurately setting the parent guarantees that
147 The device's bus field is a pointer to the bus type the device
151 Optionally, the bus driver may set the device's name and release
154 The name field is an ASCII string describing the device, like
159 when the device has been removed, and all references to it have
163 - Register the device.
165 Once the generic device has been initialized, it can be registered
175 If a bus driver unregisters a device, it should not immediately free
177 device's release method, then free the bus-specific object.
178 (There may be other code that is currently referencing the device
179 structure, and it would be rude to free the device while that is
183 When the device is registered, a directory in sysfs is created.
207 that point to the device's directory in the physical hierarchy.
292 static int pci_device_remove(struct device * dev)
328 The model assumes that a device or driver can be dynamically
333 A driver typically contains a list of device IDs that it supports. The
335 The format of the device IDs, and the semantics for comparing them are
341 int (*match)(struct device * dev, struct device_driver * drv);
343 match should return '1' if the driver supports the device, and '0'
346 When a device is registered, the bus's list of drivers is iterated
350 over. bus->match() is called for each device that is not already
353 When a device is successfully bound to a driver, device->driver is
354 set, the device is added to a per-driver list of devices, and a
356 device's physical directory:
375 Whenever a device is registered with the driver model core, the
377 Users can define actions to perform when a device is inserted or
384 - DEVPATH: set to the device's physical path in sysfs.
390 int (*hotplug) (struct device *dev, char **envp,
398 The generic bus, device, and driver structures provide several fields
410 int bus_for_each_dev(struct bus_type * bus, struct device * start,
411 void * data, int (*fn)(struct device *, void *));
432 the device and driver lists. This can be used by the bus driver
433 internally, and should be used when accessing the device or driver
439 Some of the fields in struct device and struct device_driver duplicate