Lines Matching refs:chan

19 static int mbox_of_xlate_default(struct mbox_chan *chan,  in mbox_of_xlate_default()  argument
22 debug("%s(chan=%p)\n", __func__, chan); in mbox_of_xlate_default()
29 chan->id = args->args[0]; in mbox_of_xlate_default()
34 int mbox_get_by_index(struct udevice *dev, int index, struct mbox_chan *chan) in mbox_get_by_index() argument
41 debug("%s(dev=%p, index=%d, chan=%p)\n", __func__, dev, index, chan); in mbox_get_by_index()
59 chan->dev = dev_mbox; in mbox_get_by_index()
61 ret = ops->of_xlate(chan, &args); in mbox_get_by_index()
63 ret = mbox_of_xlate_default(chan, &args); in mbox_get_by_index()
69 ret = ops->request(chan); in mbox_get_by_index()
79 struct mbox_chan *chan) in mbox_get_by_name() argument
83 debug("%s(dev=%p, name=%s, chan=%p)\n", __func__, dev, name, chan); in mbox_get_by_name()
91 return mbox_get_by_index(dev, index, chan); in mbox_get_by_name()
94 int mbox_free(struct mbox_chan *chan) in mbox_free() argument
96 struct mbox_ops *ops = mbox_dev_ops(chan->dev); in mbox_free()
98 debug("%s(chan=%p)\n", __func__, chan); in mbox_free()
100 return ops->free(chan); in mbox_free()
103 int mbox_send(struct mbox_chan *chan, const void *data) in mbox_send() argument
105 struct mbox_ops *ops = mbox_dev_ops(chan->dev); in mbox_send()
107 debug("%s(chan=%p, data=%p)\n", __func__, chan, data); in mbox_send()
109 return ops->send(chan, data); in mbox_send()
112 int mbox_recv(struct mbox_chan *chan, void *data, ulong timeout_us) in mbox_recv() argument
114 struct mbox_ops *ops = mbox_dev_ops(chan->dev); in mbox_recv()
118 debug("%s(chan=%p, data=%p, timeout_us=%ld)\n", __func__, chan, data, in mbox_recv()
130 ret = ops->recv(chan, data); in mbox_recv()