Lines Matching +full:rpmsg +full:- +full:channel +full:- +full:name
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Remote processor messaging - sample client driver
8 * Ohad Ben-Cohen <ohad@wizery.com>
14 #include <linux/rpmsg.h>
29 struct instance_data *idata = dev_get_drvdata(&rpdev->dev); in rpmsg_sample_cb()
31 dev_info(&rpdev->dev, "incoming msg %d (src: 0x%x)\n", in rpmsg_sample_cb()
32 ++idata->rx_count, src); in rpmsg_sample_cb()
38 if (idata->rx_count >= count) { in rpmsg_sample_cb()
39 dev_info(&rpdev->dev, "goodbye!\n"); in rpmsg_sample_cb()
44 ret = rpmsg_send(rpdev->ept, MSG, strlen(MSG)); in rpmsg_sample_cb()
46 dev_err(&rpdev->dev, "rpmsg_send failed: %d\n", ret); in rpmsg_sample_cb()
56 dev_info(&rpdev->dev, "new channel: 0x%x -> 0x%x!\n", in rpmsg_sample_probe()
57 rpdev->src, rpdev->dst); in rpmsg_sample_probe()
59 idata = devm_kzalloc(&rpdev->dev, sizeof(*idata), GFP_KERNEL); in rpmsg_sample_probe()
61 return -ENOMEM; in rpmsg_sample_probe()
63 dev_set_drvdata(&rpdev->dev, idata); in rpmsg_sample_probe()
66 ret = rpmsg_send(rpdev->ept, MSG, strlen(MSG)); in rpmsg_sample_probe()
68 dev_err(&rpdev->dev, "rpmsg_send failed: %d\n", ret); in rpmsg_sample_probe()
77 dev_info(&rpdev->dev, "rpmsg sample client driver is removed\n"); in rpmsg_sample_remove()
81 { .name = "rpmsg-client-sample" },
84 MODULE_DEVICE_TABLE(rpmsg, rpmsg_driver_sample_id_table);
87 .drv.name = KBUILD_MODNAME,