Lines Matching refs:dev_node
119 int uvb_to_host(const struct uvb_node *const dev_node, in uvb_to_host() argument
126 msg = uvb_alloc_msg(dev_node); in uvb_to_host()
140 struct uvb_node *const dev_node, in subscribe_msg() argument
152 msg->sink = dev_node; in subscribe_msg()
159 struct uvb_node *const dev_node) in unsubscribe_msg() argument
170 msg->sink = dev_node; in unsubscribe_msg()
191 int uvb_subscribe(const char *name, struct uvb_node *const dev_node) in uvb_subscribe() argument
200 return subscribe_msg(host_node, dev_node, UVB_MSG_SUBSCRIBE); in uvb_subscribe()
203 int uvb_unsubscribe(const char *name, struct uvb_node *const dev_node) in uvb_unsubscribe() argument
212 return unsubscribe_msg(host_node, dev_node); in uvb_unsubscribe()
218 struct uvb_node *dev_node; in handle_msg_subscribe() local
221 dev_node = msg->sink; in handle_msg_subscribe()
222 if (atomic_get(&dev_node->subscribed)) { in handle_msg_subscribe()
223 LOG_ERR("%p already subscribed", dev_node); in handle_msg_subscribe()
227 LOG_DBG("%p -> %p", dev_node, host_node); in handle_msg_subscribe()
228 sys_dnode_init(&dev_node->node); in handle_msg_subscribe()
230 sys_dlist_prepend(&host_node->list, &dev_node->node); in handle_msg_subscribe()
233 atomic_inc(&dev_node->subscribed); in handle_msg_subscribe()
238 struct uvb_node *dev_node; in handle_msg_unsubscribe() local
241 dev_node = msg->sink; in handle_msg_unsubscribe()
242 tmp = atomic_clear(&dev_node->subscribed); in handle_msg_unsubscribe()
244 LOG_DBG("unsubscribe %p", dev_node); in handle_msg_unsubscribe()
245 sys_dlist_remove(&dev_node->node); in handle_msg_unsubscribe()
247 LOG_ERR("%p is not subscribed", dev_node); in handle_msg_unsubscribe()
254 struct uvb_node *dev_node; in handle_msg_event() local
257 SYS_DLIST_FOR_EACH_CONTAINER(&host_node->list, dev_node, node) { in handle_msg_event()
258 LOG_DBG("%p from %p to %p", msg, host_node, dev_node); in handle_msg_event()
259 if (dev_node->notify) { in handle_msg_event()
260 dev_node->notify(dev_node->priv, in handle_msg_event()