Lines Matching refs:device
31 struct device;
118 struct device *dev_root;
123 int (*match)(struct device *dev, struct device_driver *drv);
124 int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
125 int (*probe)(struct device *dev);
126 int (*remove)(struct device *dev);
127 void (*shutdown)(struct device *dev);
129 int (*online)(struct device *dev);
130 int (*offline)(struct device *dev);
132 int (*suspend)(struct device *dev, pm_message_t state);
133 int (*resume)(struct device *dev);
135 int (*num_vf)(struct device *dev);
137 int (*dma_configure)(struct device *dev);
162 struct device *start,
164 struct device *subsys_dev_iter_next(struct subsys_dev_iter *iter);
167 int device_match_name(struct device *dev, const void *name);
168 int device_match_of_node(struct device *dev, const void *np);
169 int device_match_fwnode(struct device *dev, const void *fwnode);
170 int device_match_devt(struct device *dev, const void *pdevt);
171 int device_match_acpi_dev(struct device *dev, const void *adev);
172 int device_match_any(struct device *dev, const void *unused);
174 int bus_for_each_dev(struct bus_type *bus, struct device *start, void *data,
175 int (*fn)(struct device *dev, void *data));
176 struct device *bus_find_device(struct bus_type *bus, struct device *start,
178 int (*match)(struct device *dev, const void *data));
186 static inline struct device *bus_find_device_by_name(struct bus_type *bus, in bus_find_device_by_name()
187 struct device *start, in bus_find_device_by_name()
199 static inline struct device *
211 static inline struct device *
223 static inline struct device *bus_find_device_by_devt(struct bus_type *bus, in bus_find_device_by_devt()
235 static inline struct device *
236 bus_find_next_device(struct bus_type *bus,struct device *cur) in bus_find_next_device()
250 static inline struct device *
256 static inline struct device *
263 struct device *subsys_find_device_by_id(struct bus_type *bus, unsigned int id,
264 struct device *hint);
268 int (*compare)(const struct device *a,
269 const struct device *b));
381 int (*probe) (struct device *dev);
382 int (*remove) (struct device *dev);
383 void (*shutdown) (struct device *dev);
384 int (*suspend) (struct device *dev, pm_message_t state);
385 int (*resume) (struct device *dev);
390 void (*coredump) (struct device *dev);
426 struct device *start,
428 int (*fn)(struct device *dev,
430 struct device *driver_find_device(struct device_driver *drv,
431 struct device *start, const void *data,
432 int (*match)(struct device *dev, const void *data));
440 static inline struct device *driver_find_device_by_name(struct device_driver *drv, in driver_find_device_by_name()
452 static inline struct device *
465 static inline struct device *
478 static inline struct device *driver_find_device_by_devt(struct device_driver *drv, in driver_find_device_by_devt()
484 static inline struct device *driver_find_next_device(struct device_driver *drv, in driver_find_next_device()
485 struct device *start) in driver_find_next_device()
497 static inline struct device *
504 static inline struct device *
511 void driver_deferred_probe_add(struct device *dev);
512 int driver_deferred_probe_check_state(struct device *dev);
513 int driver_deferred_probe_check_state_continue(struct device *dev);
532 int (*add_dev)(struct device *dev, struct subsys_interface *sif);
533 void (*remove_dev)(struct device *dev, struct subsys_interface *sif);
581 int (*dev_uevent)(struct device *dev, struct kobj_uevent_env *env);
582 char *(*devnode)(struct device *dev, umode_t *mode);
585 void (*dev_release)(struct device *dev);
587 int (*shutdown_pre)(struct device *dev);
590 const void *(*namespace)(struct device *dev);
592 void (*get_ownership)(struct device *dev, kuid_t *uid, kgid_t *gid);
621 int class_compat_create_link(struct class_compat *cls, struct device *dev,
622 struct device *device_link);
623 void class_compat_remove_link(struct class_compat *cls, struct device *dev,
624 struct device *device_link);
628 struct device *start,
630 extern struct device *class_dev_iter_next(struct class_dev_iter *iter);
633 extern int class_for_each_device(struct class *class, struct device *start,
635 int (*fn)(struct device *dev, void *data));
636 extern struct device *class_find_device(struct class *class,
637 struct device *start, const void *data,
638 int (*match)(struct device *, const void *));
646 static inline struct device *class_find_device_by_name(struct class *class, in class_find_device_by_name()
658 static inline struct device *
670 static inline struct device *
683 static inline struct device *class_find_device_by_devt(struct class *class, in class_find_device_by_devt()
697 static inline struct device *
703 static inline struct device *
764 int (*add_dev) (struct device *, struct class_interface *);
765 void (*remove_dev) (struct device *, struct class_interface *);
796 int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
797 char *(*devnode)(struct device *dev, umode_t *mode,
799 void (*release)(struct device *dev);
807 ssize_t (*show)(struct device *dev, struct device_attribute *attr,
809 ssize_t (*store)(struct device *dev, struct device_attribute *attr,
818 ssize_t device_show_ulong(struct device *dev, struct device_attribute *attr,
820 ssize_t device_store_ulong(struct device *dev, struct device_attribute *attr,
822 ssize_t device_show_int(struct device *dev, struct device_attribute *attr,
824 ssize_t device_store_int(struct device *dev, struct device_attribute *attr,
826 ssize_t device_show_bool(struct device *dev, struct device_attribute *attr,
828 ssize_t device_store_bool(struct device *dev, struct device_attribute *attr,
855 extern int device_create_file(struct device *device,
857 extern void device_remove_file(struct device *dev,
859 extern bool device_remove_file_self(struct device *dev,
861 extern int __must_check device_create_bin_file(struct device *dev,
863 extern void device_remove_bin_file(struct device *dev,
867 typedef void (*dr_release_t)(struct device *dev, void *res);
868 typedef int (*dr_match_t)(struct device *dev, void *res, void *match_data);
886 extern void devres_for_each_res(struct device *dev, dr_release_t release,
888 void (*fn)(struct device *, void *, void *),
891 extern void devres_add(struct device *dev, void *res);
892 extern void *devres_find(struct device *dev, dr_release_t release,
894 extern void *devres_get(struct device *dev, void *new_res,
896 extern void *devres_remove(struct device *dev, dr_release_t release,
898 extern int devres_destroy(struct device *dev, dr_release_t release,
900 extern int devres_release(struct device *dev, dr_release_t release,
904 extern void * __must_check devres_open_group(struct device *dev, void *id,
906 extern void devres_close_group(struct device *dev, void *id);
907 extern void devres_remove_group(struct device *dev, void *id);
908 extern int devres_release_group(struct device *dev, void *id);
911 extern void *devm_kmalloc(struct device *dev, size_t size, gfp_t gfp) __malloc;
913 char *devm_kvasprintf(struct device *dev, gfp_t gfp, const char *fmt,
916 char *devm_kasprintf(struct device *dev, gfp_t gfp, const char *fmt, ...) __malloc;
917 static inline void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp) in devm_kzalloc()
921 static inline void *devm_kmalloc_array(struct device *dev, in devm_kmalloc_array()
931 static inline void *devm_kcalloc(struct device *dev, in devm_kcalloc()
936 extern void devm_kfree(struct device *dev, const void *p);
937 extern char *devm_kstrdup(struct device *dev, const char *s, gfp_t gfp) __malloc;
938 extern const char *devm_kstrdup_const(struct device *dev,
940 extern void *devm_kmemdup(struct device *dev, const void *src, size_t len,
943 extern unsigned long devm_get_free_pages(struct device *dev,
945 extern void devm_free_pages(struct device *dev, unsigned long addr);
947 void __iomem *devm_ioremap_resource(struct device *dev,
950 void __iomem *devm_of_iomap(struct device *dev,
955 int devm_add_action(struct device *dev, void (*action)(void *), void *data);
956 void devm_remove_action(struct device *dev, void (*action)(void *), void *data);
957 void devm_release_action(struct device *dev, void (*action)(void *), void *data);
959 static inline int devm_add_action_or_reset(struct device *dev, in devm_add_action_or_reset()
986 void __percpu *__devm_alloc_percpu(struct device *dev, size_t size,
988 void devm_free_percpu(struct device *dev, void __percpu *pdata);
1023 void *device_connection_find_match(struct device *dev, const char *con_id,
1026 struct device *device_connection_find(struct device *dev, const char *con_id);
1106 struct device *supplier;
1108 struct device *consumer;
1229 struct device { struct
1231 struct device *parent; argument
1306 void (*release)(struct device *dev); argument
1321 static inline struct device *kobj_to_dev(struct kobject *kobj) in kobj_to_dev() argument
1323 return container_of(kobj, struct device, kobj); in kobj_to_dev()
1331 static inline bool device_iommu_mapped(struct device *dev) in device_iommu_mapped()
1339 static inline const char *dev_name(const struct device *dev) in dev_name()
1349 int dev_set_name(struct device *dev, const char *name, ...);
1352 static inline int dev_to_node(struct device *dev) in dev_to_node()
1356 static inline void set_dev_node(struct device *dev, int node) in set_dev_node()
1361 static inline int dev_to_node(struct device *dev) in dev_to_node()
1365 static inline void set_dev_node(struct device *dev, int node) in set_dev_node()
1370 static inline struct irq_domain *dev_get_msi_domain(const struct device *dev) in dev_get_msi_domain()
1379 static inline void dev_set_msi_domain(struct device *dev, struct irq_domain *d) in dev_set_msi_domain()
1386 static inline void *dev_get_drvdata(const struct device *dev) in dev_get_drvdata()
1391 static inline void dev_set_drvdata(struct device *dev, void *data) in dev_set_drvdata()
1396 static inline struct pm_subsys_data *dev_to_psd(struct device *dev) in dev_to_psd()
1401 static inline unsigned int dev_get_uevent_suppress(const struct device *dev) in dev_get_uevent_suppress()
1406 static inline void dev_set_uevent_suppress(struct device *dev, int val) in dev_set_uevent_suppress()
1411 static inline int device_is_registered(struct device *dev) in device_is_registered()
1416 static inline void device_enable_async_suspend(struct device *dev) in device_enable_async_suspend()
1422 static inline void device_disable_async_suspend(struct device *dev) in device_disable_async_suspend()
1428 static inline bool device_async_suspend_enabled(struct device *dev) in device_async_suspend_enabled()
1433 static inline bool device_pm_not_required(struct device *dev) in device_pm_not_required()
1438 static inline void device_set_pm_not_required(struct device *dev) in device_set_pm_not_required()
1443 static inline void dev_pm_syscore_device(struct device *dev, bool val) in dev_pm_syscore_device()
1450 static inline void dev_pm_set_driver_flags(struct device *dev, u32 flags) in dev_pm_set_driver_flags()
1455 static inline bool dev_pm_test_driver_flags(struct device *dev, u32 flags) in dev_pm_test_driver_flags()
1460 static inline void device_lock(struct device *dev) in device_lock()
1465 static inline int device_lock_interruptible(struct device *dev) in device_lock_interruptible()
1470 static inline int device_trylock(struct device *dev) in device_trylock()
1475 static inline void device_unlock(struct device *dev) in device_unlock()
1480 static inline void device_lock_assert(struct device *dev) in device_lock_assert()
1485 static inline struct device_node *dev_of_node(struct device *dev) in dev_of_node()
1497 extern int __must_check device_register(struct device *dev);
1498 extern void device_unregister(struct device *dev);
1499 extern void device_initialize(struct device *dev);
1500 extern int __must_check device_add(struct device *dev);
1501 extern void device_del(struct device *dev);
1502 extern int device_for_each_child(struct device *dev, void *data,
1503 int (*fn)(struct device *dev, void *data));
1504 extern int device_for_each_child_reverse(struct device *dev, void *data,
1505 int (*fn)(struct device *dev, void *data));
1506 extern struct device *device_find_child(struct device *dev, void *data,
1507 int (*match)(struct device *dev, void *data));
1508 extern struct device *device_find_child_by_name(struct device *parent,
1510 extern int device_rename(struct device *dev, const char *new_name);
1511 extern int device_move(struct device *dev, struct device *new_parent,
1513 extern const char *device_get_devnode(struct device *dev,
1517 static inline bool device_supports_offline(struct device *dev) in device_supports_offline()
1525 extern int device_offline(struct device *dev);
1526 extern int device_online(struct device *dev);
1527 extern void set_primary_fwnode(struct device *dev, struct fwnode_handle *fwnode);
1528 extern void set_secondary_fwnode(struct device *dev, struct fwnode_handle *fwnode);
1529 void device_set_of_node_from_dev(struct device *dev, const struct device *dev2);
1531 static inline int dev_num_vf(struct device *dev) in dev_num_vf()
1541 extern struct device *__root_device_register(const char *name,
1548 extern void root_device_unregister(struct device *root);
1550 static inline void *dev_get_platdata(const struct device *dev) in dev_get_platdata()
1559 extern int __must_check device_bind_driver(struct device *dev);
1560 extern void device_release_driver(struct device *dev);
1561 extern int __must_check device_attach(struct device *dev);
1563 extern void device_initial_probe(struct device *dev);
1564 extern int __must_check device_reprobe(struct device *dev);
1566 extern bool device_is_bound(struct device *dev);
1572 struct device *device_create_vargs(struct class *cls, struct device *parent,
1576 struct device *device_create(struct class *cls, struct device *parent,
1580 struct device *device_create_with_groups(struct class *cls,
1581 struct device *parent, dev_t devt, void *drvdata,
1586 extern int __must_check device_add_groups(struct device *dev,
1588 extern void device_remove_groups(struct device *dev,
1591 static inline int __must_check device_add_group(struct device *dev, in device_add_group()
1599 static inline void device_remove_group(struct device *dev, in device_remove_group()
1607 extern int __must_check devm_device_add_groups(struct device *dev,
1609 extern void devm_device_remove_groups(struct device *dev,
1611 extern int __must_check devm_device_add_group(struct device *dev,
1613 extern void devm_device_remove_group(struct device *dev,
1622 extern int (*platform_notify)(struct device *dev);
1624 extern int (*platform_notify_remove)(struct device *dev);
1631 extern struct device *get_device(struct device *dev);
1632 extern void put_device(struct device *dev);
1633 extern bool kill_device(struct device *dev);
1636 extern int devtmpfs_create_node(struct device *dev);
1637 extern int devtmpfs_delete_node(struct device *dev);
1640 static inline int devtmpfs_create_node(struct device *dev) { return 0; } in devtmpfs_create_node()
1641 static inline int devtmpfs_delete_node(struct device *dev) { return 0; } in devtmpfs_delete_node()
1649 extern const char *dev_driver_string(const struct device *dev);
1652 struct device_link *device_link_add(struct device *consumer,
1653 struct device *supplier, u32 flags);
1655 void device_link_remove(void *consumer, struct device *supplier);
1664 int dev_vprintk_emit(int level, const struct device *dev,
1667 int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...);
1670 void dev_printk(const char *level, const struct device *dev,
1673 void _dev_emerg(const struct device *dev, const char *fmt, ...);
1675 void _dev_alert(const struct device *dev, const char *fmt, ...);
1677 void _dev_crit(const struct device *dev, const char *fmt, ...);
1679 void _dev_err(const struct device *dev, const char *fmt, ...);
1681 void _dev_warn(const struct device *dev, const char *fmt, ...);
1683 void _dev_notice(const struct device *dev, const char *fmt, ...);
1685 void _dev_info(const struct device *dev, const char *fmt, ...);
1690 int dev_vprintk_emit(int level, const struct device *dev, in dev_vprintk_emit()
1694 int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...) in dev_printk_emit()
1697 static inline void __dev_printk(const char *level, const struct device *dev, in __dev_printk()
1701 void dev_printk(const char *level, const struct device *dev, in dev_printk()
1706 void _dev_emerg(const struct device *dev, const char *fmt, ...) in _dev_emerg()
1709 void _dev_crit(const struct device *dev, const char *fmt, ...) in _dev_crit()
1712 void _dev_alert(const struct device *dev, const char *fmt, ...) in _dev_alert()
1715 void _dev_err(const struct device *dev, const char *fmt, ...) in _dev_err()
1718 void _dev_warn(const struct device *dev, const char *fmt, ...) in _dev_warn()
1721 void _dev_notice(const struct device *dev, const char *fmt, ...) in _dev_notice()
1724 void _dev_info(const struct device *dev, const char *fmt, ...) in _dev_info()