summaryrefslogtreecommitdiffstats
path: root/drivers/rpmsg/rpmsg_ctrl.c
AgeCommit message (Collapse)AuthorFilesLines
2022-03-13rpmsg: ctrl: Introduce new RPMSG_CREATE/RELEASE_DEV_IOCTL controlsArnaud Pouliquen1-4/+32
Allow the user space application to create and release an rpmsg device by adding RPMSG_CREATE_DEV_IOCTL and RPMSG_RELEASE_DEV_IOCTL ioctrls to the /dev/rpmsg_ctrl interface The RPMSG_CREATE_DEV_IOCTL Ioctl can be used to instantiate a local rpmsg device. Depending on the back-end implementation, the associated rpmsg driver is probed and a NS announcement can be sent to the remote processor. The RPMSG_RELEASE_DEV_IOCTL allows the user application to release a rpmsg device created either by the remote processor or with the RPMSG_CREATE_DEV_IOCTL call. Depending on the back-end implementation, the associated rpmsg driver is removed and a NS destroy rpmsg can be sent to the remote processor. Suggested-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20220124102524.295783-12-arnaud.pouliquen@foss.st.com
2022-03-13rpmsg: Update rpmsg_chrdev_register_device functionArnaud Pouliquen1-1/+1
The rpmsg_chrdev driver has been replaced by the rpmsg_ctrl driver for the /dev/rpmsg_ctrlX devices management. The reference for the driver override is now the rpmsg_ctrl. Update the rpmsg_chrdev_register_device function to reflect the update, and rename the function to use the rpmsg_ctrldev prefix. The platform drivers are updated accordingly. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20220124102524.295783-8-arnaud.pouliquen@foss.st.com
2022-03-13rpmsg: Move the rpmsg control device from rpmsg_char to rpmsg_ctrlArnaud Pouliquen1-0/+215
Create the rpmsg_ctrl.c module and move the code related to the rpmsg_ctrldev device in this new module. Add the dependency between rpmsg_char and rpmsg_ctrl in the kconfig file: 1) RPMSG_CTRL can set as module or built-in if RPMSG=y || RPMSG_CHAR=y || RPMSG_CHAR=n 2) RPMSG_CTRL can not be set as built-in if RPMSG=m || RPMSG_CHAR=m Note that RPMGH_CHAR and RPMSG_CTRL can be activated separately. Therefore, the RPMSG_CTRL configuration must be set for backwards compatibility. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20220124102524.295783-4-arnaud.pouliquen@foss.st.com