1 /* SPDX-License-Identifier: GPL-2.0 */ 2 3 #ifndef _LINUX_RPMSG_NS_H 4 #define _LINUX_RPMSG_NS_H 5 6 #include <linux/mod_devicetable.h> 7 #include <linux/rpmsg.h> 8 #include <linux/rpmsg/byteorder.h> 9 #include <linux/types.h> 10 11 /** 12 * struct rpmsg_ns_msg - dynamic name service announcement message 13 * @name: name of remote service that is published 14 * @addr: address of remote service that is published 15 * @flags: indicates whether service is created or destroyed 16 * 17 * This message is sent across to publish a new service, or announce 18 * about its removal. When we receive these messages, an appropriate 19 * rpmsg channel (i.e device) is created/destroyed. In turn, the ->probe() 20 * or ->remove() handler of the appropriate rpmsg driver will be invoked 21 * (if/as-soon-as one is registered). 22 */ 23 struct rpmsg_ns_msg { 24 char name[RPMSG_NAME_SIZE]; 25 __rpmsg32 addr; 26 __rpmsg32 flags; 27 } __packed; 28 29 /** 30 * enum rpmsg_ns_flags - dynamic name service announcement flags 31 * 32 * @RPMSG_NS_CREATE: a new remote service was just created 33 * @RPMSG_NS_DESTROY: a known remote service was just destroyed 34 */ 35 enum rpmsg_ns_flags { 36 RPMSG_NS_CREATE = 0, 37 RPMSG_NS_DESTROY = 1, 38 }; 39 40 /* Address 53 is reserved for advertising remote services */ 41 #define RPMSG_NS_ADDR (53) 42 43 int rpmsg_ns_register_device(struct rpmsg_device *rpdev); 44 45 #endif 46