Lines Matching refs:devdata
19 struct intel_adsp_ipc_data *devdata = dev->data; in intel_adsp_ipc_set_message_handler() local
20 k_spinlock_key_t key = k_spin_lock(&devdata->lock); in intel_adsp_ipc_set_message_handler()
22 devdata->handle_message = fn; in intel_adsp_ipc_set_message_handler()
23 devdata->handler_arg = arg; in intel_adsp_ipc_set_message_handler()
24 k_spin_unlock(&devdata->lock, key); in intel_adsp_ipc_set_message_handler()
30 struct intel_adsp_ipc_data *devdata = dev->data; in intel_adsp_ipc_set_done_handler() local
31 k_spinlock_key_t key = k_spin_lock(&devdata->lock); in intel_adsp_ipc_set_done_handler()
33 devdata->done_notify = fn; in intel_adsp_ipc_set_done_handler()
34 devdata->done_arg = arg; in intel_adsp_ipc_set_done_handler()
35 k_spin_unlock(&devdata->lock, key); in intel_adsp_ipc_set_done_handler()
42 struct intel_adsp_ipc_data *devdata = dev->data; in z_intel_adsp_ipc_isr() local
45 k_spinlock_key_t key = k_spin_lock(&devdata->lock); in z_intel_adsp_ipc_isr()
50 if (devdata->handle_message != NULL) { in z_intel_adsp_ipc_isr()
54 done = devdata->handle_message(dev, devdata->handler_arg, msg, ext); in z_intel_adsp_ipc_isr()
73 if (devdata->done_notify != NULL) { in z_intel_adsp_ipc_isr()
74 external_completion = devdata->done_notify(dev, devdata->done_arg); in z_intel_adsp_ipc_isr()
76 devdata->tx_ack_pending = false; in z_intel_adsp_ipc_isr()
81 k_sem_give(&devdata->sem); in z_intel_adsp_ipc_isr()
85 k_spin_unlock(&devdata->lock, key); in z_intel_adsp_ipc_isr()
92 k_spin_unlock(&devdata->lock, key); in z_intel_adsp_ipc_isr()
98 struct intel_adsp_ipc_data *devdata = dev->data; in intel_adsp_ipc_init() local
101 memset(devdata, 0, sizeof(*devdata)); in intel_adsp_ipc_init()
103 k_sem_init(&devdata->sem, 0, 1); in intel_adsp_ipc_init()
135 const struct intel_adsp_ipc_data *devdata = dev->data; in intel_adsp_ipc_is_complete() local
138 return not_busy && !devdata->tx_ack_pending; in intel_adsp_ipc_is_complete()
155 struct intel_adsp_ipc_data *devdata = dev->data; in intel_adsp_ipc_send_message() local
156 k_spinlock_key_t key = k_spin_lock(&devdata->lock); in intel_adsp_ipc_send_message()
158 if ((config->regs->idr & INTEL_ADSP_IPC_BUSY) != 0 || devdata->tx_ack_pending) { in intel_adsp_ipc_send_message()
159 k_spin_unlock(&devdata->lock, key); in intel_adsp_ipc_send_message()
163 k_sem_reset(&devdata->sem); in intel_adsp_ipc_send_message()
166 devdata->tx_ack_pending = true; in intel_adsp_ipc_send_message()
169 k_spin_unlock(&devdata->lock, key); in intel_adsp_ipc_send_message()
178 struct intel_adsp_ipc_data *devdata = dev->data; in intel_adsp_ipc_send_message_sync() local
183 k_sem_take(&devdata->sem, timeout); in intel_adsp_ipc_send_message_sync()
243 struct intel_adsp_ipc_data *devdata = dev->data; in intel_adsp_ipc_set_resume_handler() local
244 k_spinlock_key_t key = k_spin_lock(&devdata->lock); in intel_adsp_ipc_set_resume_handler()
249 k_spin_unlock(&devdata->lock, key); in intel_adsp_ipc_set_resume_handler()
257 struct intel_adsp_ipc_data *devdata = dev->data; in intel_adsp_ipc_set_suspend_handler() local
258 k_spinlock_key_t key = k_spin_lock(&devdata->lock); in intel_adsp_ipc_set_suspend_handler()
263 k_spin_unlock(&devdata->lock, key); in intel_adsp_ipc_set_suspend_handler()