Lines Matching full:instance

17 int ipc_service_open_instance(const struct device *instance)  in ipc_service_open_instance()  argument
21 if (!instance) { in ipc_service_open_instance()
22 LOG_ERR("Invalid instance"); in ipc_service_open_instance()
26 backend = (const struct ipc_service_backend *) instance->api; in ipc_service_open_instance()
38 return backend->open_instance(instance); in ipc_service_open_instance()
41 int ipc_service_close_instance(const struct device *instance) in ipc_service_close_instance() argument
45 if (!instance) { in ipc_service_close_instance()
46 LOG_ERR("Invalid instance"); in ipc_service_close_instance()
50 backend = (const struct ipc_service_backend *) instance->api; in ipc_service_close_instance()
62 return backend->close_instance(instance); in ipc_service_close_instance()
65 int ipc_service_register_endpoint(const struct device *instance, in ipc_service_register_endpoint() argument
71 if (!instance || !ept || !cfg) { in ipc_service_register_endpoint()
72 LOG_ERR("Invalid instance, endpoint or configuration"); in ipc_service_register_endpoint()
76 backend = (const struct ipc_service_backend *) instance->api; in ipc_service_register_endpoint()
85 ept->instance = instance; in ipc_service_register_endpoint()
87 return backend->register_endpoint(instance, &ept->token, cfg); in ipc_service_register_endpoint()
100 if (!ept->instance) { in ipc_service_deregister_endpoint()
105 backend = ept->instance->api; in ipc_service_deregister_endpoint()
112 err = backend->deregister_endpoint(ept->instance, ept->token); in ipc_service_deregister_endpoint()
117 ept->instance = 0; in ipc_service_deregister_endpoint()
132 if (!ept->instance) { in ipc_service_send()
137 backend = ept->instance->api; in ipc_service_send()
144 return backend->send(ept->instance, ept->token, data, len); in ipc_service_send()
156 if (!ept->instance) { in ipc_service_get_tx_buffer_size()
161 backend = ept->instance->api; in ipc_service_get_tx_buffer_size()
173 return backend->get_tx_buffer_size(ept->instance, ept->token); in ipc_service_get_tx_buffer_size()
185 if (!ept->instance) { in ipc_service_get_tx_buffer()
190 backend = ept->instance->api; in ipc_service_get_tx_buffer()
202 return backend->get_tx_buffer(ept->instance, ept->token, data, len, wait); in ipc_service_get_tx_buffer()
214 if (!ept->instance) { in ipc_service_drop_tx_buffer()
219 backend = ept->instance->api; in ipc_service_drop_tx_buffer()
231 return backend->drop_tx_buffer(ept->instance, ept->token, data); in ipc_service_drop_tx_buffer()
243 if (!ept->instance) { in ipc_service_send_nocopy()
248 backend = ept->instance->api; in ipc_service_send_nocopy()
260 return backend->send_nocopy(ept->instance, ept->token, data, len); in ipc_service_send_nocopy()
272 if (!ept->instance) { in ipc_service_hold_rx_buffer()
277 backend = ept->instance->api; in ipc_service_hold_rx_buffer()
290 return backend->hold_rx_buffer(ept->instance, ept->token, data); in ipc_service_hold_rx_buffer()
301 if (!ept->instance) { in ipc_service_release_rx_buffer()
306 backend = ept->instance->api; in ipc_service_release_rx_buffer()
319 return backend->release_rx_buffer(ept->instance, ept->token, data); in ipc_service_release_rx_buffer()