Lines Matching refs:dev
36 const struct device *dev = __device_start; in z_device_state_init() local
38 while (dev < __device_end) { in z_device_state_init()
39 z_object_init(dev); in z_device_state_init()
40 ++dev; in z_device_state_init()
71 const struct device *dev = entry->dev; in z_sys_init_run_level() local
72 int rc = entry->init(dev); in z_sys_init_run_level()
74 if (dev != NULL) { in z_sys_init_run_level()
85 dev->state->init_res = rc; in z_sys_init_run_level()
87 dev->state->initialized = true; in z_sys_init_run_level()
94 const struct device *dev; in z_impl_device_get_binding() local
108 for (dev = __device_start; dev != __device_end; dev++) { in z_impl_device_get_binding()
109 if (z_device_ready(dev) && (dev->name == name)) { in z_impl_device_get_binding()
110 return dev; in z_impl_device_get_binding()
114 for (dev = __device_start; dev != __device_end; dev++) { in z_impl_device_get_binding()
115 if (z_device_ready(dev) && (strcmp(name, dev->name) == 0)) { in z_impl_device_get_binding()
116 return dev; in z_impl_device_get_binding()
137 static inline int z_vrfy_device_usable_check(const struct device *dev) in z_vrfy_device_usable_check() argument
139 Z_OOPS(Z_SYSCALL_OBJ_INIT(dev, K_OBJ_ANY)); in z_vrfy_device_usable_check()
141 return z_impl_device_usable_check(dev); in z_vrfy_device_usable_check()
152 bool z_device_ready(const struct device *dev) in z_device_ready() argument
158 if (dev == NULL) { in z_device_ready()
162 return dev->state->initialized && (dev->state->init_res == 0U); in z_device_ready()
165 int device_required_foreach(const struct device *dev, in device_required_foreach() argument
171 device_required_handles_get(dev, &handle_count); in device_required_foreach()