mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 15:29:16 +00:00
8109517b39
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
47 lines
1.0 KiB
C
47 lines
1.0 KiB
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
/*
|
|
* Copyright (c) 2016, Linaro Ltd.
|
|
*/
|
|
|
|
#ifndef _UAPI_RPMSG_H_
|
|
#define _UAPI_RPMSG_H_
|
|
|
|
#include <linux/ioctl.h>
|
|
#include <linux/types.h>
|
|
|
|
#define RPMSG_ADDR_ANY 0xFFFFFFFF
|
|
|
|
/**
|
|
* struct rpmsg_endpoint_info - endpoint info representation
|
|
* @name: name of service
|
|
* @src: local address. To set to RPMSG_ADDR_ANY if not used.
|
|
* @dst: destination address. To set to RPMSG_ADDR_ANY if not used.
|
|
*/
|
|
struct rpmsg_endpoint_info {
|
|
char name[32];
|
|
__u32 src;
|
|
__u32 dst;
|
|
};
|
|
|
|
/**
|
|
* Instantiate a new rmpsg char device endpoint.
|
|
*/
|
|
#define RPMSG_CREATE_EPT_IOCTL _IOW(0xb5, 0x1, struct rpmsg_endpoint_info)
|
|
|
|
/**
|
|
* Destroy a rpmsg char device endpoint created by the RPMSG_CREATE_EPT_IOCTL.
|
|
*/
|
|
#define RPMSG_DESTROY_EPT_IOCTL _IO(0xb5, 0x2)
|
|
|
|
/**
|
|
* Instantiate a new local rpmsg service device.
|
|
*/
|
|
#define RPMSG_CREATE_DEV_IOCTL _IOW(0xb5, 0x3, struct rpmsg_endpoint_info)
|
|
|
|
/**
|
|
* Release a local rpmsg device.
|
|
*/
|
|
#define RPMSG_RELEASE_DEV_IOCTL _IOW(0xb5, 0x4, struct rpmsg_endpoint_info)
|
|
|
|
#endif
|