Lines Matching refs:device

31 struct device;
117 struct device *dev_root;
122 int (*match)(struct device *dev, struct device_driver *drv);
123 int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
124 int (*probe)(struct device *dev);
125 int (*remove)(struct device *dev);
126 void (*shutdown)(struct device *dev);
128 int (*online)(struct device *dev);
129 int (*offline)(struct device *dev);
131 int (*suspend)(struct device *dev, pm_message_t state);
132 int (*resume)(struct device *dev);
134 int (*num_vf)(struct device *dev);
136 int (*dma_configure)(struct device *dev);
161 struct device *start,
163 struct device *subsys_dev_iter_next(struct subsys_dev_iter *iter);
166 int bus_for_each_dev(struct bus_type *bus, struct device *start, void *data,
167 int (*fn)(struct device *dev, void *data));
168 struct device *bus_find_device(struct bus_type *bus, struct device *start,
170 int (*match)(struct device *dev, void *data));
171 struct device *bus_find_device_by_name(struct bus_type *bus,
172 struct device *start,
174 struct device *subsys_find_device_by_id(struct bus_type *bus, unsigned int id,
175 struct device *hint);
179 int (*compare)(const struct device *a,
180 const struct device *b));
290 int (*probe) (struct device *dev);
291 int (*remove) (struct device *dev);
292 void (*shutdown) (struct device *dev);
293 int (*suspend) (struct device *dev, pm_message_t state);
294 int (*resume) (struct device *dev);
298 void (*coredump) (struct device *dev);
334 struct device *start,
336 int (*fn)(struct device *dev,
338 struct device *driver_find_device(struct device_driver *drv,
339 struct device *start, void *data,
340 int (*match)(struct device *dev, void *data));
342 void driver_deferred_probe_add(struct device *dev);
343 int driver_deferred_probe_check_state(struct device *dev);
362 int (*add_dev)(struct device *dev, struct subsys_interface *sif);
363 void (*remove_dev)(struct device *dev, struct subsys_interface *sif);
411 int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env);
412 char *(*devnode)(struct device *dev, umode_t *mode);
415 void (*dev_release)(struct device *dev);
417 int (*shutdown_pre)(struct device *dev);
420 const void *(*namespace)(struct device *dev);
422 void (*get_ownership)(struct device *dev, kuid_t *uid, kgid_t *gid);
451 int class_compat_create_link(struct class_compat *cls, struct device *dev,
452 struct device *device_link);
453 void class_compat_remove_link(struct class_compat *cls, struct device *dev,
454 struct device *device_link);
458 struct device *start,
460 extern struct device *class_dev_iter_next(struct class_dev_iter *iter);
463 extern int class_for_each_device(struct class *class, struct device *start,
465 int (*fn)(struct device *dev, void *data));
466 extern struct device *class_find_device(struct class *class,
467 struct device *start, const void *data,
468 int (*match)(struct device *, const void *));
524 int (*add_dev) (struct device *, struct class_interface *);
525 void (*remove_dev) (struct device *, struct class_interface *);
556 int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
557 char *(*devnode)(struct device *dev, umode_t *mode,
559 void (*release)(struct device *dev);
567 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
569 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
578 ssize_t device_show_ulong(struct device *dev, struct device_attribute *attr,
580 ssize_t device_store_ulong(struct device *dev, struct device_attribute *attr,
582 ssize_t device_show_int(struct device *dev, struct device_attribute *attr,
584 ssize_t device_store_int(struct device *dev, struct device_attribute *attr,
586 ssize_t device_show_bool(struct device *dev, struct device_attribute *attr,
588 ssize_t device_store_bool(struct device *dev, struct device_attribute *attr,
615 extern int device_create_file(struct device *device,
617 extern void device_remove_file(struct device *dev,
619 extern bool device_remove_file_self(struct device *dev,
621 extern int __must_check device_create_bin_file(struct device *dev,
623 extern void device_remove_bin_file(struct device *dev,
627 typedef void (*dr_release_t)(struct device *dev, void *res);
628 typedef int (*dr_match_t)(struct device *dev, void *res, void *match_data);
646 extern void devres_for_each_res(struct device *dev, dr_release_t release,
648 void (*fn)(struct device *, void *, void *),
651 extern void devres_add(struct device *dev, void *res);
652 extern void *devres_find(struct device *dev, dr_release_t release,
654 extern void *devres_get(struct device *dev, void *new_res,
656 extern void *devres_remove(struct device *dev, dr_release_t release,
658 extern int devres_destroy(struct device *dev, dr_release_t release,
660 extern int devres_release(struct device *dev, dr_release_t release,
664 extern void * __must_check devres_open_group(struct device *dev, void *id,
666 extern void devres_close_group(struct device *dev, void *id);
667 extern void devres_remove_group(struct device *dev, void *id);
668 extern int devres_release_group(struct device *dev, void *id);
671 extern void *devm_kmalloc(struct device *dev, size_t size, gfp_t gfp) __malloc;
673 char *devm_kvasprintf(struct device *dev, gfp_t gfp, const char *fmt,
676 char *devm_kasprintf(struct device *dev, gfp_t gfp, const char *fmt, ...) __malloc;
677 static inline void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp) in devm_kzalloc()
681 static inline void *devm_kmalloc_array(struct device *dev, in devm_kmalloc_array()
691 static inline void *devm_kcalloc(struct device *dev, in devm_kcalloc()
696 extern void devm_kfree(struct device *dev, void *p);
697 extern char *devm_kstrdup(struct device *dev, const char *s, gfp_t gfp) __malloc;
698 extern void *devm_kmemdup(struct device *dev, const void *src, size_t len,
701 extern unsigned long devm_get_free_pages(struct device *dev,
703 extern void devm_free_pages(struct device *dev, unsigned long addr);
705 void __iomem *devm_ioremap_resource(struct device *dev,
708 void __iomem *devm_of_iomap(struct device *dev,
713 int devm_add_action(struct device *dev, void (*action)(void *), void *data);
714 void devm_remove_action(struct device *dev, void (*action)(void *), void *data);
716 static inline int devm_add_action_or_reset(struct device *dev, in devm_add_action_or_reset()
743 void __percpu *__devm_alloc_percpu(struct device *dev, size_t size,
745 void devm_free_percpu(struct device *dev, void __percpu *pdata);
768 void *device_connection_find_match(struct device *dev, const char *con_id,
773 struct device *device_connection_find(struct device *dev, const char *con_id);
852 struct device *supplier;
854 struct device *consumer;
970 struct device { struct
971 struct device *parent; argument
1044 void (*release)(struct device *dev); argument
1053 static inline struct device *kobj_to_dev(struct kobject *kobj) in kobj_to_dev() argument
1055 return container_of(kobj, struct device, kobj); in kobj_to_dev()
1061 static inline const char *dev_name(const struct device *dev) in dev_name()
1071 int dev_set_name(struct device *dev, const char *name, ...);
1074 static inline int dev_to_node(struct device *dev) in dev_to_node()
1078 static inline void set_dev_node(struct device *dev, int node) in set_dev_node()
1083 static inline int dev_to_node(struct device *dev) in dev_to_node()
1087 static inline void set_dev_node(struct device *dev, int node) in set_dev_node()
1092 static inline struct irq_domain *dev_get_msi_domain(const struct device *dev) in dev_get_msi_domain()
1101 static inline void dev_set_msi_domain(struct device *dev, struct irq_domain *d) in dev_set_msi_domain()
1108 static inline void *dev_get_drvdata(const struct device *dev) in dev_get_drvdata()
1113 static inline void dev_set_drvdata(struct device *dev, void *data) in dev_set_drvdata()
1118 static inline struct pm_subsys_data *dev_to_psd(struct device *dev) in dev_to_psd()
1123 static inline unsigned int dev_get_uevent_suppress(const struct device *dev) in dev_get_uevent_suppress()
1128 static inline void dev_set_uevent_suppress(struct device *dev, int val) in dev_set_uevent_suppress()
1133 static inline int device_is_registered(struct device *dev) in device_is_registered()
1138 static inline void device_enable_async_suspend(struct device *dev) in device_enable_async_suspend()
1144 static inline void device_disable_async_suspend(struct device *dev) in device_disable_async_suspend()
1150 static inline bool device_async_suspend_enabled(struct device *dev) in device_async_suspend_enabled()
1155 static inline void dev_pm_syscore_device(struct device *dev, bool val) in dev_pm_syscore_device()
1162 static inline void dev_pm_set_driver_flags(struct device *dev, u32 flags) in dev_pm_set_driver_flags()
1167 static inline bool dev_pm_test_driver_flags(struct device *dev, u32 flags) in dev_pm_test_driver_flags()
1172 static inline void device_lock(struct device *dev) in device_lock()
1177 static inline int device_lock_interruptible(struct device *dev) in device_lock_interruptible()
1182 static inline int device_trylock(struct device *dev) in device_trylock()
1187 static inline void device_unlock(struct device *dev) in device_unlock()
1192 static inline void device_lock_assert(struct device *dev) in device_lock_assert()
1197 static inline struct device_node *dev_of_node(struct device *dev) in dev_of_node()
1209 extern int __must_check device_register(struct device *dev);
1210 extern void device_unregister(struct device *dev);
1211 extern void device_initialize(struct device *dev);
1212 extern int __must_check device_add(struct device *dev);
1213 extern void device_del(struct device *dev);
1214 extern int device_for_each_child(struct device *dev, void *data,
1215 int (*fn)(struct device *dev, void *data));
1216 extern int device_for_each_child_reverse(struct device *dev, void *data,
1217 int (*fn)(struct device *dev, void *data));
1218 extern struct device *device_find_child(struct device *dev, void *data,
1219 int (*match)(struct device *dev, void *data));
1220 extern int device_rename(struct device *dev, const char *new_name);
1221 extern int device_move(struct device *dev, struct device *new_parent,
1223 extern const char *device_get_devnode(struct device *dev,
1227 static inline bool device_supports_offline(struct device *dev) in device_supports_offline()
1235 extern int device_offline(struct device *dev);
1236 extern int device_online(struct device *dev);
1237 extern void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode);
1238 extern void set_secondary_fwnode(struct device *dev, struct fwnode_handle *fwnode);
1239 void device_set_of_node_from_dev(struct device *dev, const struct device *dev2);
1241 static inline int dev_num_vf(struct device *dev) in dev_num_vf()
1251 extern struct device *__root_device_register(const char *name,
1258 extern void root_device_unregister(struct device *root);
1260 static inline void *dev_get_platdata(const struct device *dev) in dev_get_platdata()
1269 extern int __must_check device_bind_driver(struct device *dev);
1270 extern void device_release_driver(struct device *dev);
1271 extern int __must_check device_attach(struct device *dev);
1273 extern void device_initial_probe(struct device *dev);
1274 extern int __must_check device_reprobe(struct device *dev);
1276 extern bool device_is_bound(struct device *dev);
1282 struct device *device_create_vargs(struct class *cls, struct device *parent,
1286 struct device *device_create(struct class *cls, struct device *parent,
1290 struct device *device_create_with_groups(struct class *cls,
1291 struct device *parent, dev_t devt, void *drvdata,
1296 extern int __must_check device_add_groups(struct device *dev,
1298 extern void device_remove_groups(struct device *dev,
1301 static inline int __must_check device_add_group(struct device *dev, in device_add_group()
1309 static inline void device_remove_group(struct device *dev, in device_remove_group()
1317 extern int __must_check devm_device_add_groups(struct device *dev,
1319 extern void devm_device_remove_groups(struct device *dev,
1321 extern int __must_check devm_device_add_group(struct device *dev,
1323 extern void devm_device_remove_group(struct device *dev,
1332 extern int (*platform_notify)(struct device *dev);
1334 extern int (*platform_notify_remove)(struct device *dev);
1341 extern struct device *get_device(struct device *dev);
1342 extern void put_device(struct device *dev);
1343 extern bool kill_device(struct device *dev);
1346 extern int devtmpfs_create_node(struct device *dev);
1347 extern int devtmpfs_delete_node(struct device *dev);
1350 static inline int devtmpfs_create_node(struct device *dev) { return 0; } in devtmpfs_create_node()
1351 static inline int devtmpfs_delete_node(struct device *dev) { return 0; } in devtmpfs_delete_node()
1359 extern const char *dev_driver_string(const struct device *dev);
1362 struct device_link *device_link_add(struct device *consumer,
1363 struct device *supplier, u32 flags);
1365 void device_link_remove(void *consumer, struct device *supplier);
1374 int dev_vprintk_emit(int level, const struct device *dev,
1377 int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...);
1380 void dev_printk(const char *level, const struct device *dev,
1383 void _dev_emerg(const struct device *dev, const char *fmt, ...);
1385 void _dev_alert(const struct device *dev, const char *fmt, ...);
1387 void _dev_crit(const struct device *dev, const char *fmt, ...);
1389 void _dev_err(const struct device *dev, const char *fmt, ...);
1391 void _dev_warn(const struct device *dev, const char *fmt, ...);
1393 void _dev_notice(const struct device *dev, const char *fmt, ...);
1395 void _dev_info(const struct device *dev, const char *fmt, ...);
1400 int dev_vprintk_emit(int level, const struct device *dev, in dev_vprintk_emit()
1404 int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...) in dev_printk_emit()
1407 static inline void __dev_printk(const char *level, const struct device *dev, in __dev_printk()
1411 void dev_printk(const char *level, const struct device *dev, in dev_printk()
1416 void _dev_emerg(const struct device *dev, const char *fmt, ...) in _dev_emerg()
1419 void _dev_crit(const struct device *dev, const char *fmt, ...) in _dev_crit()
1422 void _dev_alert(const struct device *dev, const char *fmt, ...) in _dev_alert()
1425 void _dev_err(const struct device *dev, const char *fmt, ...) in _dev_err()
1428 void _dev_warn(const struct device *dev, const char *fmt, ...) in _dev_warn()
1431 void _dev_notice(const struct device *dev, const char *fmt, ...) in _dev_notice()
1434 void _dev_info(const struct device *dev, const char *fmt, ...) in _dev_info()