Lines Matching refs:device

32 struct device;
108 struct device *dev_root;
114 int (*match)(struct device *dev, struct device_driver *drv);
115 int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
116 int (*probe)(struct device *dev);
117 int (*remove)(struct device *dev);
118 void (*shutdown)(struct device *dev);
120 int (*online)(struct device *dev);
121 int (*offline)(struct device *dev);
123 int (*suspend)(struct device *dev, pm_message_t state);
124 int (*resume)(struct device *dev);
147 struct device *start,
149 struct device *subsys_dev_iter_next(struct subsys_dev_iter *iter);
152 int bus_for_each_dev(struct bus_type *bus, struct device *start, void *data,
153 int (*fn)(struct device *dev, void *data));
154 struct device *bus_find_device(struct bus_type *bus, struct device *start,
156 int (*match)(struct device *dev, void *data));
157 struct device *bus_find_device_by_name(struct bus_type *bus,
158 struct device *start,
160 struct device *subsys_find_device_by_id(struct bus_type *bus, unsigned int id,
161 struct device *hint);
165 int (*compare)(const struct device *a,
166 const struct device *b));
242 int (*probe) (struct device *dev);
243 int (*remove) (struct device *dev);
244 void (*shutdown) (struct device *dev);
245 int (*suspend) (struct device *dev, pm_message_t state);
246 int (*resume) (struct device *dev);
288 struct device *start,
290 int (*fn)(struct device *dev,
292 struct device *driver_find_device(struct device_driver *drv,
293 struct device *start, void *data,
294 int (*match)(struct device *dev, void *data));
313 int (*add_dev)(struct device *dev, struct subsys_interface *sif);
314 int (*remove_dev)(struct device *dev, struct subsys_interface *sif);
361 int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env);
362 char *(*devnode)(struct device *dev, umode_t *mode);
365 void (*dev_release)(struct device *dev);
367 int (*suspend)(struct device *dev, pm_message_t state);
368 int (*resume)(struct device *dev);
371 const void *(*namespace)(struct device *dev);
400 int class_compat_create_link(struct class_compat *cls, struct device *dev,
401 struct device *device_link);
402 void class_compat_remove_link(struct class_compat *cls, struct device *dev,
403 struct device *device_link);
407 struct device *start,
409 extern struct device *class_dev_iter_next(struct class_dev_iter *iter);
412 extern int class_for_each_device(struct class *class, struct device *start,
414 int (*fn)(struct device *dev, void *data));
415 extern struct device *class_find_device(struct class *class,
416 struct device *start, const void *data,
417 int (*match)(struct device *, const void *));
473 int (*add_dev) (struct device *, struct class_interface *);
474 void (*remove_dev) (struct device *, struct class_interface *);
505 int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
506 char *(*devnode)(struct device *dev, umode_t *mode,
508 void (*release)(struct device *dev);
516 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
518 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
527 ssize_t device_show_ulong(struct device *dev, struct device_attribute *attr,
529 ssize_t device_store_ulong(struct device *dev, struct device_attribute *attr,
531 ssize_t device_show_int(struct device *dev, struct device_attribute *attr,
533 ssize_t device_store_int(struct device *dev, struct device_attribute *attr,
535 ssize_t device_show_bool(struct device *dev, struct device_attribute *attr,
537 ssize_t device_store_bool(struct device *dev, struct device_attribute *attr,
561 extern int device_create_file(struct device *device,
563 extern void device_remove_file(struct device *dev,
565 extern bool device_remove_file_self(struct device *dev,
567 extern int __must_check device_create_bin_file(struct device *dev,
569 extern void device_remove_bin_file(struct device *dev,
573 typedef void (*dr_release_t)(struct device *dev, void *res);
574 typedef int (*dr_match_t)(struct device *dev, void *res, void *match_data);
584 extern void devres_for_each_res(struct device *dev, dr_release_t release,
586 void (*fn)(struct device *, void *, void *),
589 extern void devres_add(struct device *dev, void *res);
590 extern void *devres_find(struct device *dev, dr_release_t release,
592 extern void *devres_get(struct device *dev, void *new_res,
594 extern void *devres_remove(struct device *dev, dr_release_t release,
596 extern int devres_destroy(struct device *dev, dr_release_t release,
598 extern int devres_release(struct device *dev, dr_release_t release,
602 extern void * __must_check devres_open_group(struct device *dev, void *id,
604 extern void devres_close_group(struct device *dev, void *id);
605 extern void devres_remove_group(struct device *dev, void *id);
606 extern int devres_release_group(struct device *dev, void *id);
609 extern void *devm_kmalloc(struct device *dev, size_t size, gfp_t gfp);
610 extern char *devm_kvasprintf(struct device *dev, gfp_t gfp, const char *fmt,
613 char *devm_kasprintf(struct device *dev, gfp_t gfp, const char *fmt, ...);
614 static inline void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp) in devm_kzalloc()
618 static inline void *devm_kmalloc_array(struct device *dev, in devm_kmalloc_array()
625 static inline void *devm_kcalloc(struct device *dev, in devm_kcalloc()
630 extern void devm_kfree(struct device *dev, void *p);
631 extern char *devm_kstrdup(struct device *dev, const char *s, gfp_t gfp);
632 extern void *devm_kmemdup(struct device *dev, const void *src, size_t len,
635 extern unsigned long devm_get_free_pages(struct device *dev,
637 extern void devm_free_pages(struct device *dev, unsigned long addr);
639 void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res);
642 int devm_add_action(struct device *dev, void (*action)(void *), void *data);
643 void devm_remove_action(struct device *dev, void (*action)(void *), void *data);
723 struct device { struct
724 struct device *parent; argument
787 void (*release)(struct device *dev); argument
794 static inline struct device *kobj_to_dev(struct kobject *kobj) in kobj_to_dev() argument
796 return container_of(kobj, struct device, kobj); in kobj_to_dev()
802 static inline const char *dev_name(const struct device *dev) in dev_name()
812 int dev_set_name(struct device *dev, const char *name, ...);
815 static inline int dev_to_node(struct device *dev) in dev_to_node()
819 static inline void set_dev_node(struct device *dev, int node) in set_dev_node()
824 static inline int dev_to_node(struct device *dev) in dev_to_node()
828 static inline void set_dev_node(struct device *dev, int node) in set_dev_node()
833 static inline void *dev_get_drvdata(const struct device *dev) in dev_get_drvdata()
838 static inline void dev_set_drvdata(struct device *dev, void *data) in dev_set_drvdata()
843 static inline struct pm_subsys_data *dev_to_psd(struct device *dev) in dev_to_psd()
848 static inline unsigned int dev_get_uevent_suppress(const struct device *dev) in dev_get_uevent_suppress()
853 static inline void dev_set_uevent_suppress(struct device *dev, int val) in dev_set_uevent_suppress()
858 static inline int device_is_registered(struct device *dev) in device_is_registered()
863 static inline void device_enable_async_suspend(struct device *dev) in device_enable_async_suspend()
869 static inline void device_disable_async_suspend(struct device *dev) in device_disable_async_suspend()
875 static inline bool device_async_suspend_enabled(struct device *dev) in device_async_suspend_enabled()
880 static inline void pm_suspend_ignore_children(struct device *dev, bool enable) in pm_suspend_ignore_children()
885 static inline void dev_pm_syscore_device(struct device *dev, bool val) in dev_pm_syscore_device()
892 static inline void device_lock(struct device *dev) in device_lock()
897 static inline int device_trylock(struct device *dev) in device_trylock()
902 static inline void device_unlock(struct device *dev) in device_unlock()
907 static inline void device_lock_assert(struct device *dev) in device_lock_assert()
912 static inline struct device_node *dev_of_node(struct device *dev) in dev_of_node()
924 extern int __must_check device_register(struct device *dev);
925 extern void device_unregister(struct device *dev);
926 extern void device_initialize(struct device *dev);
927 extern int __must_check device_add(struct device *dev);
928 extern void device_del(struct device *dev);
929 extern int device_for_each_child(struct device *dev, void *data,
930 int (*fn)(struct device *dev, void *data));
931 extern struct device *device_find_child(struct device *dev, void *data,
932 int (*match)(struct device *dev, void *data));
933 extern int device_rename(struct device *dev, const char *new_name);
934 extern int device_move(struct device *dev, struct device *new_parent,
936 extern const char *device_get_devnode(struct device *dev,
940 static inline bool device_supports_offline(struct device *dev) in device_supports_offline()
948 extern int device_offline(struct device *dev);
949 extern int device_online(struct device *dev);
950 extern void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode);
951 extern void set_secondary_fwnode(struct device *dev, struct fwnode_handle *fwnode);
956 extern struct device *__root_device_register(const char *name,
963 extern void root_device_unregister(struct device *root);
965 static inline void *dev_get_platdata(const struct device *dev) in dev_get_platdata()
974 extern int __must_check device_bind_driver(struct device *dev);
975 extern void device_release_driver(struct device *dev);
976 extern int __must_check device_attach(struct device *dev);
978 extern int __must_check device_reprobe(struct device *dev);
983 extern struct device *device_create_vargs(struct class *cls,
984 struct device *parent,
990 struct device *device_create(struct class *cls, struct device *parent,
994 struct device *device_create_with_groups(struct class *cls,
995 struct device *parent, dev_t devt, void *drvdata,
1006 extern int (*platform_notify)(struct device *dev);
1008 extern int (*platform_notify_remove)(struct device *dev);
1015 extern struct device *get_device(struct device *dev);
1016 extern void put_device(struct device *dev);
1019 extern int devtmpfs_create_node(struct device *dev);
1020 extern int devtmpfs_delete_node(struct device *dev);
1023 static inline int devtmpfs_create_node(struct device *dev) { return 0; } in devtmpfs_create_node()
1024 static inline int devtmpfs_delete_node(struct device *dev) { return 0; } in devtmpfs_delete_node()
1032 extern const char *dev_driver_string(const struct device *dev);
1038 int dev_vprintk_emit(int level, const struct device *dev,
1041 int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...);
1044 void dev_printk(const char *level, const struct device *dev,
1047 void dev_emerg(const struct device *dev, const char *fmt, ...);
1049 void dev_alert(const struct device *dev, const char *fmt, ...);
1051 void dev_crit(const struct device *dev, const char *fmt, ...);
1053 void dev_err(const struct device *dev, const char *fmt, ...);
1055 void dev_warn(const struct device *dev, const char *fmt, ...);
1057 void dev_notice(const struct device *dev, const char *fmt, ...);
1059 void _dev_info(const struct device *dev, const char *fmt, ...);
1064 int dev_vprintk_emit(int level, const struct device *dev, in dev_vprintk_emit()
1068 int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...) in dev_printk_emit()
1071 static inline void __dev_printk(const char *level, const struct device *dev, in __dev_printk()
1075 void dev_printk(const char *level, const struct device *dev, in dev_printk()
1080 void dev_emerg(const struct device *dev, const char *fmt, ...) in dev_emerg()
1083 void dev_crit(const struct device *dev, const char *fmt, ...) in dev_crit()
1086 void dev_alert(const struct device *dev, const char *fmt, ...) in dev_alert()
1089 void dev_err(const struct device *dev, const char *fmt, ...) in dev_err()
1092 void dev_warn(const struct device *dev, const char *fmt, ...) in dev_warn()
1095 void dev_notice(const struct device *dev, const char *fmt, ...) in dev_notice()
1098 void _dev_info(const struct device *dev, const char *fmt, ...) in _dev_info()