Lines Matching full:instance
18 struct ipc_rpmsg_instance *instance; in ns_bind_cb() local
23 instance = CONTAINER_OF(p_rvdev->shpool, struct ipc_rpmsg_instance, shm_pool); in ns_bind_cb()
26 ept = &instance->endpoint[i]; in ns_bind_cb()
36 dest, instance->cb, rpmsg_service_unbind); in ns_bind_cb()
42 if (instance->bound_cb) { in ns_bind_cb()
43 instance->bound_cb(ept); in ns_bind_cb()
49 int ipc_rpmsg_register_ept(struct ipc_rpmsg_instance *instance, unsigned int role, in ipc_rpmsg_register_ept() argument
54 if (!instance || !ept) { in ipc_rpmsg_register_ept()
58 rdev = rpmsg_virtio_get_rpmsg_device(&instance->rvdev); in ipc_rpmsg_register_ept()
66 RPMSG_ADDR_ANY, instance->cb, rpmsg_service_unbind); in ipc_rpmsg_register_ept()
72 int ipc_rpmsg_init(struct ipc_rpmsg_instance *instance, in ipc_rpmsg_init() argument
82 if (!instance || !shb) { in ipc_rpmsg_init()
96 rpmsg_virtio_init_shm_pool(&instance->shm_pool, shb, size); in ipc_rpmsg_init()
98 return rpmsg_init_vdev_with_config(&instance->rvdev, vdev, bind_cb, in ipc_rpmsg_init()
99 shm_io, &instance->shm_pool, in ipc_rpmsg_init()
102 return rpmsg_init_vdev(&instance->rvdev, vdev, bind_cb, shm_io, NULL); in ipc_rpmsg_init()
106 int ipc_rpmsg_deinit(struct ipc_rpmsg_instance *instance, in ipc_rpmsg_deinit() argument
109 if (!instance) { in ipc_rpmsg_deinit()
113 rpmsg_deinit_vdev(&instance->rvdev); in ipc_rpmsg_deinit()
116 memset(&instance->shm_pool, 0, sizeof(struct rpmsg_virtio_shm_pool)); in ipc_rpmsg_deinit()