| 317 | } |
| 318 | |
| 319 | struct rt_mbox_chan *rt_mbox_request_by_name(struct rt_mbox_client *client, char *name) |
| 320 | { |
| 321 | int index; |
| 322 | struct rt_ofw_node *np; |
| 323 | |
| 324 | if (!client || !name) |
| 325 | { |
| 326 | return rt_err_ptr(-RT_EINVAL); |
| 327 | } |
| 328 | |
| 329 | np = client->dev->ofw_node; |
| 330 | index = rt_ofw_prop_index_of_string(np, "mbox-names", name); |
| 331 | |
| 332 | if (index < 0) |
| 333 | { |
| 334 | return RT_NULL; |
| 335 | } |
| 336 | |
| 337 | return rt_mbox_request_by_index(client, index); |
| 338 | } |
| 339 | |
| 340 | rt_err_t rt_mbox_release(struct rt_mbox_chan *chan) |
| 341 | { |
nothing calls this directly
no test coverage detected