Lines Matching refs:dev
117 struct device dev; member
173 #define to_smd_edge(d) container_of(d, struct qcom_smd_edge, dev)
450 dev_dbg(&edge->dev, "set_state(%s, %d)\n", channel->name, state); in qcom_smd_channel_set_state()
839 dev_err(&edge->dev, "remote side did not enter opening state\n"); in qcom_smd_channel_open()
850 dev_err(&edge->dev, "remote side did not enter open state\n"); in qcom_smd_channel_open()
921 dev_err(&rpdev->dev, "channel %s is busy\n", channel->name); in qcom_smd_create_ept()
1061 static void qcom_smd_release_device(struct device *dev) in qcom_smd_release_device() argument
1063 struct rpmsg_device *rpdev = to_rpmsg_device(dev); in qcom_smd_release_device()
1078 dev_dbg(&edge->dev, "registering '%s'\n", channel->name); in qcom_smd_create_device()
1096 rpdev->dev.of_node = qcom_smd_match_channel(edge->of_node, channel->name); in qcom_smd_create_device()
1097 rpdev->dev.parent = &edge->dev; in qcom_smd_create_device()
1098 rpdev->dev.release = qcom_smd_release_device; in qcom_smd_create_device()
1113 qsdev->rpdev.dev.parent = &edge->dev; in qcom_smd_create_chrdev()
1114 qsdev->rpdev.dev.release = qcom_smd_release_device; in qcom_smd_create_chrdev()
1166 dev_err(&edge->dev, in qcom_smd_create_channel()
1181 dev_dbg(&edge->dev, "new channel '%s' info-size: %zu fifo-size: %zu\n", in qcom_smd_create_channel()
1254 dev_dbg(&edge->dev, "new channel found: '%s'\n", channel->name); in qcom_channel_scan_worker()
1329 rpmsg_unregister_device(&edge->dev, &chinfo); in qcom_channel_state_worker()
1339 static int qcom_smd_parse_edge(struct device *dev, in qcom_smd_parse_edge() argument
1359 dev_err(dev, "edge missing %s property\n", key); in qcom_smd_parse_edge()
1367 edge->mbox_client.dev = dev; in qcom_smd_parse_edge()
1380 dev_err(dev, "no qcom,ipc node\n"); in qcom_smd_parse_edge()
1395 dev_err(dev, "no offset in %s\n", key); in qcom_smd_parse_edge()
1401 dev_err(dev, "no bit in %s\n", key); in qcom_smd_parse_edge()
1412 dev_err(dev, "required smd interrupt missing\n"); in qcom_smd_parse_edge()
1417 ret = devm_request_irq(dev, irq, in qcom_smd_parse_edge()
1421 dev_err(dev, "failed to request smd irq\n"); in qcom_smd_parse_edge()
1440 static void qcom_smd_edge_release(struct device *dev) in qcom_smd_edge_release() argument
1443 struct qcom_smd_edge *edge = to_smd_edge(dev); in qcom_smd_edge_release()
1454 static ssize_t rpmsg_name_show(struct device *dev, in rpmsg_name_show() argument
1457 struct qcom_smd_edge *edge = to_smd_edge(dev); in rpmsg_name_show()
1491 edge->dev.parent = parent; in qcom_smd_register_edge()
1492 edge->dev.release = qcom_smd_edge_release; in qcom_smd_register_edge()
1493 edge->dev.of_node = node; in qcom_smd_register_edge()
1494 edge->dev.groups = qcom_smd_edge_groups; in qcom_smd_register_edge()
1495 dev_set_name(&edge->dev, "%s:%pOFn", dev_name(parent), node); in qcom_smd_register_edge()
1496 ret = device_register(&edge->dev); in qcom_smd_register_edge()
1499 put_device(&edge->dev); in qcom_smd_register_edge()
1503 ret = qcom_smd_parse_edge(&edge->dev, node, edge); in qcom_smd_register_edge()
1505 dev_err(&edge->dev, "failed to parse smd edge\n"); in qcom_smd_register_edge()
1511 dev_err(&edge->dev, "failed to register chrdev for edge\n"); in qcom_smd_register_edge()
1523 device_unregister(&edge->dev); in qcom_smd_register_edge()
1528 static int qcom_smd_remove_device(struct device *dev, void *data) in qcom_smd_remove_device() argument
1530 device_unregister(dev); in qcom_smd_remove_device()
1547 ret = device_for_each_child(&edge->dev, NULL, qcom_smd_remove_device); in qcom_smd_unregister_edge()
1549 dev_warn(&edge->dev, "can't remove smd device: %d\n", ret); in qcom_smd_unregister_edge()
1552 device_unregister(&edge->dev); in qcom_smd_unregister_edge()
1563 for_each_available_child_of_node(pdev->dev.of_node, node) in qcom_smd_probe()
1564 qcom_smd_register_edge(&pdev->dev, node); in qcom_smd_probe()
1569 static int qcom_smd_remove_edge(struct device *dev, void *data) in qcom_smd_remove_edge() argument
1571 struct qcom_smd_edge *edge = to_smd_edge(dev); in qcom_smd_remove_edge()
1588 device_for_each_child(&pdev->dev, NULL, qcom_smd_remove_edge); in qcom_smd_remove()