[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200731121043.24199-6-arnaud.pouliquen@st.com>
Date: Fri, 31 Jul 2020 14:10:35 +0200
From: Arnaud Pouliquen <arnaud.pouliquen@...com>
To: Bjorn Andersson <bjorn.andersson@...aro.org>,
Ohad Ben-Cohen <ohad@...ery.com>,
Mathieu Poirier <mathieu.poirier@...aro.org>
CC: <linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<arnaud.pouliquen@...com>
Subject: [PATCH 05/13] rpmsg: uapi: add service param for create destroy ioctls
To allow to associate an endpoint creation to a service, add
a new parameter in rpmsg_endpoint_info struct.
For each RPMsg service driver that want to support the ioctl interface
a new service will have to be added.
The RPMSG_START_PRIVATE_SERVICES is used to allow developer to add is
own services with ID higher or equal to 1024.
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@...com>
---
include/uapi/linux/rpmsg.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/include/uapi/linux/rpmsg.h b/include/uapi/linux/rpmsg.h
index e14c6dab4223..2ccc10ffacd4 100644
--- a/include/uapi/linux/rpmsg.h
+++ b/include/uapi/linux/rpmsg.h
@@ -9,16 +9,32 @@
#include <linux/ioctl.h>
#include <linux/types.h>
+/**
+ * enum rpmsg_services - list of supported RPMsg services
+ *
+ * @RPMSG_RAW_SERVICE: char device RPMSG service
+ * @RPMSG_START_PRIVATE_SERVICES: private services have to be declared after.
+ */
+enum rpmsg_services {
+ /* Reserved services */
+ RPMSG_RAW_SERVICE = 0,
+
+ /* Private services */
+ RPMSG_START_PRIVATE_SERVICES = 1024,
+};
+
/**
* struct rpmsg_endpoint_info - endpoint info representation
* @name: name of service
* @src: local address
* @dst: destination address
+ * @service: associated RPMsg service
*/
struct rpmsg_endpoint_info {
char name[32];
__u32 src;
__u32 dst;
+ __u32 service;
};
#define RPMSG_CREATE_EPT_IOCTL _IOW(0xb5, 0x1, struct rpmsg_endpoint_info)
--
2.17.1
Powered by blists - more mailing lists