Lines Matching refs:dev
155 #define device_get_ops(dev) (dev->driver->ops) argument
158 #define device_active(dev) ((dev)->flags & DM_FLAG_ACTIVATED) argument
160 static inline int dev_of_offset(const struct udevice *dev) in dev_of_offset() argument
162 return ofnode_to_offset(dev->node); in dev_of_offset()
165 static inline void dev_set_of_offset(struct udevice *dev, int of_offset) in dev_set_of_offset() argument
167 dev->node = offset_to_ofnode(of_offset); in dev_set_of_offset()
170 static inline bool dev_has_of_node(struct udevice *dev) in dev_has_of_node() argument
172 return ofnode_valid(dev->node); in dev_has_of_node()
241 int (*bind)(struct udevice *dev);
242 int (*probe)(struct udevice *dev);
243 int (*remove)(struct udevice *dev);
244 int (*unbind)(struct udevice *dev);
245 int (*ofdata_to_platdata)(struct udevice *dev);
246 int (*child_post_bind)(struct udevice *dev);
247 int (*child_pre_probe)(struct udevice *dev);
248 int (*child_post_remove)(struct udevice *dev);
273 void *dev_get_platdata(const struct udevice *dev);
283 void *dev_get_parent_platdata(const struct udevice *dev);
293 void *dev_get_uclass_platdata(const struct udevice *dev);
303 void *dev_get_priv(const struct udevice *dev);
317 void *dev_get_parent_priv(const struct udevice *dev);
327 void *dev_get_uclass_priv(const struct udevice *dev);
362 ulong dev_get_driver_data(const struct udevice *dev);
373 const void *dev_get_driver_ops(const struct udevice *dev);
381 enum uclass_id device_get_uclass_id(const struct udevice *dev);
391 const char *dev_get_uclass_name(const struct udevice *dev);
568 bool device_has_children(const struct udevice *dev);
577 bool device_has_active_children(struct udevice *dev);
590 bool device_is_last_sibling(struct udevice *dev);
608 int device_set_name(struct udevice *dev, const char *name);
618 void device_set_name_alloced(struct udevice *dev);
630 bool device_is_compatible(struct udevice *dev, const char *compat);
665 static inline bool device_is_on_pci_bus(struct udevice *dev) in device_is_on_pci_bus() argument
667 return device_get_uclass_id(dev->parent) == UCLASS_PCI; in device_is_on_pci_bus()
696 int dm_scan_fdt_dev(struct udevice *dev);
699 typedef void (*dr_release_t)(struct udevice *dev, void *res);
700 typedef int (*dr_match_t)(struct udevice *dev, void *res, void *match_data);
746 void devres_add(struct udevice *dev, void *res);
761 void *devres_find(struct udevice *dev, dr_release_t release,
777 void *devres_get(struct udevice *dev, void *new_res,
794 void *devres_remove(struct udevice *dev, dr_release_t release,
814 int devres_destroy(struct udevice *dev, dr_release_t release,
831 int devres_release(struct udevice *dev, dr_release_t release,
847 void *devm_kmalloc(struct udevice *dev, size_t size, gfp_t gfp);
848 static inline void *devm_kzalloc(struct udevice *dev, size_t size, gfp_t gfp) in devm_kzalloc() argument
850 return devm_kmalloc(dev, size, gfp | __GFP_ZERO); in devm_kzalloc()
852 static inline void *devm_kmalloc_array(struct udevice *dev, in devm_kmalloc_array() argument
857 return devm_kmalloc(dev, n * size, flags); in devm_kmalloc_array()
859 static inline void *devm_kcalloc(struct udevice *dev, in devm_kcalloc() argument
862 return devm_kmalloc_array(dev, n, size, flags | __GFP_ZERO); in devm_kcalloc()
872 void devm_kfree(struct udevice *dev, void *ptr);
886 static inline void devres_add(struct udevice *dev, void *res) in devres_add() argument
890 static inline void *devres_find(struct udevice *dev, dr_release_t release, in devres_find() argument
896 static inline void *devres_get(struct udevice *dev, void *new_res, in devres_get() argument
902 static inline void *devres_remove(struct udevice *dev, dr_release_t release, in devres_remove() argument
908 static inline int devres_destroy(struct udevice *dev, dr_release_t release, in devres_destroy() argument
914 static inline int devres_release(struct udevice *dev, dr_release_t release, in devres_release() argument
920 static inline void *devm_kmalloc(struct udevice *dev, size_t size, gfp_t gfp) in devm_kmalloc() argument
925 static inline void *devm_kzalloc(struct udevice *dev, size_t size, gfp_t gfp) in devm_kzalloc() argument
930 static inline void *devm_kmaloc_array(struct udevice *dev, in devm_kmaloc_array() argument
939 static inline void *devm_kcalloc(struct udevice *dev, in devm_kcalloc() argument
946 static inline void devm_kfree(struct udevice *dev, void *ptr) in devm_kfree() argument
977 #define dev_printk(dev, fmt, ...) \ argument
982 #define __dev_printk(level, dev, fmt, ...) \ argument
985 dev_printk(dev, fmt, ##__VA_ARGS__); \
988 #define dev_emerg(dev, fmt, ...) \ argument
989 __dev_printk(0, dev, fmt, ##__VA_ARGS__)
990 #define dev_alert(dev, fmt, ...) \ argument
991 __dev_printk(1, dev, fmt, ##__VA_ARGS__)
992 #define dev_crit(dev, fmt, ...) \ argument
993 __dev_printk(2, dev, fmt, ##__VA_ARGS__)
994 #define dev_err(dev, fmt, ...) \ argument
995 __dev_printk(3, dev, fmt, ##__VA_ARGS__)
996 #define dev_warn(dev, fmt, ...) \ argument
997 __dev_printk(4, dev, fmt, ##__VA_ARGS__)
998 #define dev_notice(dev, fmt, ...) \ argument
999 __dev_printk(5, dev, fmt, ##__VA_ARGS__)
1000 #define dev_info(dev, fmt, ...) \ argument
1001 __dev_printk(6, dev, fmt, ##__VA_ARGS__)
1004 #define dev_dbg(dev, fmt, ...) \ argument
1005 __dev_printk(7, dev, fmt, ##__VA_ARGS__)
1007 #define dev_dbg(dev, fmt, ...) \ argument
1010 __dev_printk(7, dev, fmt, ##__VA_ARGS__); \
1017 #define dev_vdbg(dev, fmt, ...) \ argument
1020 __dev_printk(7, dev, fmt, ##__VA_ARGS__); \