-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpmsg: Move structure rpmsg_ns_msg to header file
Move structure rpmsg_ns_msg to its own header file so that it can be used by other entities. Tested-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20201120214245.172963-4-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
- Loading branch information
Mathieu Poirier
authored and
Bjorn Andersson
committed
Nov 24, 2020
1 parent
5f2f6b7
commit c435a04
Showing
2 changed files
with
43 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* SPDX-License-Identifier: GPL-2.0 */ | ||
|
||
#ifndef _LINUX_RPMSG_NS_H | ||
#define _LINUX_RPMSG_NS_H | ||
|
||
#include <linux/mod_devicetable.h> | ||
#include <linux/rpmsg/byteorder.h> | ||
#include <linux/types.h> | ||
|
||
/** | ||
* struct rpmsg_ns_msg - dynamic name service announcement message | ||
* @name: name of remote service that is published | ||
* @addr: address of remote service that is published | ||
* @flags: indicates whether service is created or destroyed | ||
* | ||
* This message is sent across to publish a new service, or announce | ||
* about its removal. When we receive these messages, an appropriate | ||
* rpmsg channel (i.e device) is created/destroyed. In turn, the ->probe() | ||
* or ->remove() handler of the appropriate rpmsg driver will be invoked | ||
* (if/as-soon-as one is registered). | ||
*/ | ||
struct rpmsg_ns_msg { | ||
char name[RPMSG_NAME_SIZE]; | ||
__rpmsg32 addr; | ||
__rpmsg32 flags; | ||
} __packed; | ||
|
||
/** | ||
* enum rpmsg_ns_flags - dynamic name service announcement flags | ||
* | ||
* @RPMSG_NS_CREATE: a new remote service was just created | ||
* @RPMSG_NS_DESTROY: a known remote service was just destroyed | ||
*/ | ||
enum rpmsg_ns_flags { | ||
RPMSG_NS_CREATE = 0, | ||
RPMSG_NS_DESTROY = 1, | ||
}; | ||
|
||
/* Address 53 is reserved for advertising remote services */ | ||
#define RPMSG_NS_ADDR (53) | ||
|
||
#endif |