Lines Matching refs:chan
17 static int mbox_of_xlate_default(struct mbox_chan *chan, in mbox_of_xlate_default() argument
20 debug("%s(chan=%p)\n", __func__, chan); in mbox_of_xlate_default()
27 chan->id = args->args[0]; in mbox_of_xlate_default()
32 int mbox_get_by_index(struct udevice *dev, int index, struct mbox_chan *chan) in mbox_get_by_index() argument
39 debug("%s(dev=%p, index=%d, chan=%p)\n", __func__, dev, index, chan); in mbox_get_by_index()
66 chan->dev = dev_mbox; in mbox_get_by_index()
68 ret = ops->of_xlate(chan, &args); in mbox_get_by_index()
70 ret = mbox_of_xlate_default(chan, &args); in mbox_get_by_index()
77 ret = ops->request(chan); in mbox_get_by_index()
87 struct mbox_chan *chan) in mbox_get_by_name() argument
91 debug("%s(dev=%p, name=%s, chan=%p)\n", __func__, dev, name, chan); in mbox_get_by_name()
99 return mbox_get_by_index(dev, index, chan); in mbox_get_by_name()
102 int mbox_free(struct mbox_chan *chan) in mbox_free() argument
104 struct mbox_ops *ops = mbox_dev_ops(chan->dev); in mbox_free()
106 debug("%s(chan=%p)\n", __func__, chan); in mbox_free()
109 return ops->free(chan); in mbox_free()
114 int mbox_send(struct mbox_chan *chan, const void *data) in mbox_send() argument
116 struct mbox_ops *ops = mbox_dev_ops(chan->dev); in mbox_send()
118 debug("%s(chan=%p, data=%p)\n", __func__, chan, data); in mbox_send()
120 return ops->send(chan, data); in mbox_send()
123 int mbox_recv(struct mbox_chan *chan, void *data, ulong timeout_us) in mbox_recv() argument
125 struct mbox_ops *ops = mbox_dev_ops(chan->dev); in mbox_recv()
129 debug("%s(chan=%p, data=%p, timeout_us=%ld)\n", __func__, chan, data, in mbox_recv()
141 ret = ops->recv(chan, data); in mbox_recv()