Lines Matching full:device

25  * struct bus_type - The bus type of the device
31 * @drv_groups: Default attributes of the device drivers on the bus.
32 * @match: Called, perhaps multiple times, whenever a new device or driver
34 * given device can be handled by the given driver and zero
36 * the driver supports the device is not possible. In case of
37 * -EPROBE_DEFER it will queue the device for deferred probing.
38 * @uevent: Called when a device is added, removed, or a few other things
40 * @probe: Called when a new device or driver add to this bus, and callback
41 * the specific driver's probe to initial the matched device.
42 * @sync_state: Called to sync device state to software state after all the
43 * state tracking consumers linked to this device (present at
45 * driver. If the device has no consumers, this function will
46 * be called at late_initcall_sync level. If the device has
49 * @remove: Called when a device removed from this bus.
50 * @shutdown: Called at shut-down time to quiesce the device.
51 * @irq_get_affinity: Get IRQ affinity mask for the device on this bus.
53 * @online: Called to put the device back online (after offlining it).
54 * @offline: Called to put the device offline for hot-removal. May fail.
56 * @suspend: Called when a device on this bus wants to go to sleep mode.
57 * @resume: Called to bring a device on this bus out of sleep mode.
58 * @num_vf: Called to find out how many virtual functions a device on this
60 * @dma_configure: Called to setup DMA configuration on a device on
62 * @dma_cleanup: Called to cleanup DMA configuration on a device on
65 * device driver's pm-ops.
66 * @need_parent_lock: When probing or removing a device on this bus, the
67 * device core should lock the device's parent.
70 * purposes of the device model, all devices are connected via a bus, even if
72 * A USB controller is usually a PCI device, for example. The device model
85 int (*match)(struct device *dev, const struct device_driver *drv);
86 int (*uevent)(const struct device *dev, struct kobj_uevent_env *env);
87 int (*probe)(struct device *dev);
88 void (*sync_state)(struct device *dev);
89 void (*remove)(struct device *dev);
90 void (*shutdown)(struct device *dev);
91 const struct cpumask *(*irq_get_affinity)(struct device *dev,
94 int (*online)(struct device *dev);
95 int (*offline)(struct device *dev);
97 int (*suspend)(struct device *dev, pm_message_t state);
98 int (*resume)(struct device *dev);
100 int (*num_vf)(struct device *dev);
102 int (*dma_configure)(struct device *dev);
103 void (*dma_cleanup)(struct device *dev);
132 /* Matching function type for drivers/base APIs to find a specific device */
133 typedef int (*device_match_t)(struct device *dev, const void *data);
135 /* Generic device matching functions that all busses can use to match with */
136 int device_match_name(struct device *dev, const void *name);
137 int device_match_type(struct device *dev, const void *type);
138 int device_match_of_node(struct device *dev, const void *np);
139 int device_match_fwnode(struct device *dev, const void *fwnode);
140 int device_match_devt(struct device *dev, const void *pdevt);
141 int device_match_acpi_dev(struct device *dev, const void *adev);
142 int device_match_acpi_handle(struct device *dev, const void *handle);
143 int device_match_any(struct device *dev, const void *unused);
145 /* Device iterating function type for various driver core for_each APIs */
146 typedef int (*device_iter_t)(struct device *dev, void *data);
149 int bus_for_each_dev(const struct bus_type *bus, struct device *start,
151 struct device *bus_find_device(const struct bus_type *bus, struct device *start,
154 * bus_find_device_by_name - device iterator for locating a particular device
157 * @start: Device to begin with
158 * @name: name of the device to match
160 static inline struct device *bus_find_device_by_name(const struct bus_type *bus, in bus_find_device_by_name()
161 struct device *start, in bus_find_device_by_name()
168 * bus_find_device_by_of_node : device iterator for locating a particular device
171 * @np: of_node of the device to match.
173 static inline struct device *
180 * bus_find_device_by_fwnode : device iterator for locating a particular device
183 * @fwnode: fwnode of the device to match.
185 static inline struct device *
192 * bus_find_device_by_devt : device iterator for locating a particular device
193 * matching the device type.
195 * @devt: device type of the device to match.
197 static inline struct device *bus_find_device_by_devt(const struct bus_type *bus, in bus_find_device_by_devt()
204 * bus_find_next_device - Find the next device after a given device in a
207 * @cur: device to begin the search with.
209 static inline struct device *
210 bus_find_next_device(const struct bus_type *bus,struct device *cur) in bus_find_next_device()
219 * bus_find_device_by_acpi_dev : device iterator for locating a particular device
220 * matching the ACPI COMPANION device.
222 * @adev: ACPI COMPANION device to match.
224 static inline struct device *
230 static inline struct device *
240 int (*compare)(const struct device *a,
241 const struct device *b));
255 * @BUS_NOTIFY_ADD_DEVICE: device is added to this bus
256 * @BUS_NOTIFY_DEL_DEVICE: device is about to be removed from this bus
257 * @BUS_NOTIFY_REMOVED_DEVICE: device is successfully removed from this bus
258 * @BUS_NOTIFY_BIND_DRIVER: a driver is about to be bound to this device on this bus
259 * @BUS_NOTIFY_BOUND_DRIVER: a driver is successfully bound to this device on this bus
260 * @BUS_NOTIFY_UNBIND_DRIVER: a driver is about to be unbound from this device on this bus
261 * @BUS_NOTIFY_UNBOUND_DRIVER: a driver is successfully unbound from this device on this bus
262 * @BUS_NOTIFY_DRIVER_NOT_BOUND: a driver failed to be bound to this device on this bus
266 * Note that bus notifiers are likely to be called with the device lock already
268 * you do with the device structure.
270 * All bus notifiers are called with the target struct device * as an argument.
284 struct device *bus_get_dev_root(const struct bus_type *bus);