Lines Matching +full:interrupt +full:- +full:direction
2 * SPDX-License-Identifier: Apache-2.0
12 /* Mailbox: a simple interrupt source. Each direction has a 5-bit
13 * command register and will latch an interrupt if any of the bits are
14 * non-zero. The interrupt bits get cleared/acknowledged by writing
16 * scratch registers for use as message data in each direction.
23 * There is an array of the devices. Linux's device-tree defines two.
71 struct mbox_data *data = ((struct device *)mbox)->data; in mtk_adsp_mbox_set_handler()
74 data->handlers[chan] = handler; in mtk_adsp_mbox_set_handler()
75 data->handler_arg[chan] = arg; in mtk_adsp_mbox_set_handler()
81 const struct mbox_cfg *cfg = ((struct device *)mbox)->config; in mtk_adsp_mbox_signal()
84 cfg->mbox->out_cmd |= BIT(chan); in mtk_adsp_mbox_signal()
90 const struct mbox_cfg *cfg = ((struct device *)arg)->config; in mbox_isr()
91 struct mbox_data *data = ((struct device *)arg)->data; in mbox_isr()
94 if (cfg->mbox->in_cmd & BIT(i)) { in mbox_isr()
95 if (data->handlers[i] != NULL) { in mbox_isr()
96 data->handlers[i](arg, data->handler_arg[i]); in mbox_isr()
101 cfg->mbox->in_cmd_clr = cfg->mbox->in_cmd; /* ACK */ in mbox_isr()