Lines Matching refs:device
2 * device.h - generic, centralized driver model
30 struct device;
48 int (*match)(struct device * dev, struct device_driver * drv);
49 int (*uevent)(struct device *dev, char **envp,
51 int (*probe)(struct device * dev);
52 int (*remove)(struct device * dev);
53 void (*shutdown)(struct device * dev);
54 int (*suspend)(struct device * dev, pm_message_t state);
55 int (*resume)(struct device * dev);
65 int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data,
66 int (*fn)(struct device *, void *));
67 struct device * bus_find_device(struct bus_type *bus, struct device *start,
68 void *data, int (*match)(struct device *, void *));
99 int (*probe) (struct device * dev);
100 int (*remove) (struct device * dev);
101 void (*shutdown) (struct device * dev);
102 int (*suspend) (struct device * dev, pm_message_t state);
103 int (*resume) (struct device * dev);
129 extern int driver_for_each_device(struct device_driver * drv, struct device * start,
130 void * data, int (*fn)(struct device *, void *));
131 struct device * driver_find_device(struct device_driver *drv,
132 struct device *start, void *data,
133 int (*match)(struct device *, void *));
137 * device classes
190 * @class: pointer to the parent class for this class device. This is required.
196 * @dev: if set, a symlink to the struct device is created in the sysfs
197 * directory for this struct class device.
221 struct device * dev; /* not necessary, but nice to have */
223 struct class_device *parent; /* parent of this child device, if there is one */
279 struct device *device,
285 /* interface for exporting device attributes */
288 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
290 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
297 extern int device_create_file(struct device *device, struct device_attribute * entry);
298 extern void device_remove_file(struct device * dev, struct device_attribute * attr);
299 struct device {
304 struct device * parent;
315 struct bus_type * bus; /* type of bus device is on */
317 device */
319 void *platform_data; /* Platform specific data, device
322 BIOS data),reserved for device core*/
325 u64 *dma_mask; /* dma mask (if dma'able device) */
342 void (*release)(struct device * dev);
346 dev_get_drvdata (struct device *dev)
352 dev_set_drvdata (struct device *dev, void *data)
357 static inline int device_is_registered(struct device *dev)
365 extern int device_register(struct device * dev);
366 extern void device_unregister(struct device * dev);
367 extern void device_initialize(struct device * dev);
368 extern int device_add(struct device * dev);
369 extern void device_del(struct device * dev);
370 extern int device_for_each_child(struct device *, void *,
371 int (*fn)(struct device *, void *));
374 * Manual binding of a device to driver. See drivers/base/bus.c
377 extern void device_bind_driver(struct device * dev);
378 extern void device_release_driver(struct device * dev);
379 extern int device_attach(struct device * dev);
381 extern void device_reprobe(struct device *dev);
386 extern struct device *device_create(struct class *cls, struct device *parent,
393 * about devices and actions that the general device layer doesn't
396 /* Notify platform of device discovery */
397 extern int (*platform_notify)(struct device * dev);
399 extern int (*platform_notify_remove)(struct device * dev);
403 * get_device - atomically increment the reference count for the device.
406 extern struct device * get_device(struct device * dev);
407 extern void put_device(struct device * dev);
419 extern const char *dev_driver_string(struct device *dev);