Lines Matching full:device
25 * struct bus_type - The bus type of the device
29 * @dev_root: Default device to use as the parent.
32 * @drv_groups: Default attributes of the device drivers on the bus.
33 * @match: Called, perhaps multiple times, whenever a new device or driver
35 * given device can be handled by the given driver and zero
37 * the driver supports the device is not possible. In case of
38 * -EPROBE_DEFER it will queue the device for deferred probing.
39 * @uevent: Called when a device is added, removed, or a few other things
41 * @probe: Called when a new device or driver add to this bus, and callback
42 * the specific driver's probe to initial the matched device.
43 * @sync_state: Called to sync device state to software state after all the
44 * state tracking consumers linked to this device (present at
46 * driver. If the device has no consumers, this function will
47 * be called at late_initcall_sync level. If the device has
50 * @remove: Called when a device removed from this bus.
51 * @shutdown: Called at shut-down time to quiesce the device.
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.
72 * @need_parent_lock: When probing or removing a device on this bus, the
73 * device core should lock the device's parent.
76 * purposes of the device model, all devices are connected via a bus, even if
78 * A USB controller is usually a PCI device, for example. The device model
87 struct device *dev_root;
92 int (*match)(struct device *dev, struct device_driver *drv);
93 int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
94 int (*probe)(struct device *dev);
95 void (*sync_state)(struct device *dev);
96 void (*remove)(struct device *dev);
97 void (*shutdown)(struct device *dev);
99 int (*online)(struct device *dev);
100 int (*offline)(struct device *dev);
102 int (*suspend)(struct device *dev, pm_message_t state);
103 int (*resume)(struct device *dev);
105 int (*num_vf)(struct device *dev);
107 int (*dma_configure)(struct device *dev);
108 void (*dma_cleanup)(struct device *dev);
143 /* Generic device matching functions that all busses can use to match with */
144 int device_match_name(struct device *dev, const void *name);
145 int device_match_of_node(struct device *dev, const void *np);
146 int device_match_fwnode(struct device *dev, const void *fwnode);
147 int device_match_devt(struct device *dev, const void *pdevt);
148 int device_match_acpi_dev(struct device *dev, const void *adev);
149 int device_match_acpi_handle(struct device *dev, const void *handle);
150 int device_match_any(struct device *dev, const void *unused);
159 struct device *start,
161 struct device *subsys_dev_iter_next(struct subsys_dev_iter *iter);
164 int bus_for_each_dev(struct bus_type *bus, struct device *start, void *data,
165 int (*fn)(struct device *dev, void *data));
166 struct device *bus_find_device(struct bus_type *bus, struct device *start,
168 int (*match)(struct device *dev, const void *data));
170 * bus_find_device_by_name - device iterator for locating a particular device
173 * @start: Device to begin with
174 * @name: name of the device to match
176 static inline struct device *bus_find_device_by_name(struct bus_type *bus, in bus_find_device_by_name()
177 struct device *start, in bus_find_device_by_name()
184 * bus_find_device_by_of_node : device iterator for locating a particular device
187 * @np: of_node of the device to match.
189 static inline struct device *
196 * bus_find_device_by_fwnode : device iterator for locating a particular device
199 * @fwnode: fwnode of the device to match.
201 static inline struct device *
208 * bus_find_device_by_devt : device iterator for locating a particular device
209 * matching the device type.
211 * @devt: device type of the device to match.
213 static inline struct device *bus_find_device_by_devt(struct bus_type *bus, in bus_find_device_by_devt()
220 * bus_find_next_device - Find the next device after a given device in a
223 * @cur: device to begin the search with.
225 static inline struct device *
226 bus_find_next_device(struct bus_type *bus,struct device *cur) in bus_find_next_device()
235 * bus_find_device_by_acpi_dev : device iterator for locating a particular device
236 * matching the ACPI COMPANION device.
238 * @adev: ACPI COMPANION device to match.
240 static inline struct device *
246 static inline struct device *
253 struct device *subsys_find_device_by_id(struct bus_type *bus, unsigned int id,
254 struct device *hint);
258 int (*compare)(const struct device *a,
259 const struct device *b));
273 /* All 4 notifers below get called with the target struct device *
275 * with the device lock held in the core, so be careful.
277 #define BUS_NOTIFY_ADD_DEVICE 0x00000001 /* device added */
278 #define BUS_NOTIFY_DEL_DEVICE 0x00000002 /* device to be removed */
279 #define BUS_NOTIFY_REMOVED_DEVICE 0x00000003 /* device removed */
282 #define BUS_NOTIFY_BOUND_DRIVER 0x00000005 /* driver bound to device */
286 from the device */