Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rpmsg: smd: Expose edge registration functions

The edge registration functions is to be used from a remoteproc driver
to register and unregister an edge as the remote processor comes and
goes.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

+34
+1
drivers/rpmsg/qcom_smd.c
··· 25 25 #include <linux/soc/qcom/smem.h> 26 26 #include <linux/wait.h> 27 27 #include <linux/rpmsg.h> 28 + #include <linux/rpmsg/qcom_smd.h> 28 29 29 30 #include "rpmsg_internal.h" 30 31
+33
include/linux/rpmsg/qcom_smd.h
··· 1 + 2 + #ifndef _LINUX_RPMSG_QCOM_SMD_H 3 + #define _LINUX_RPMSG_QCOM_SMD_H 4 + 5 + #include <linux/device.h> 6 + 7 + struct qcom_smd_edge; 8 + 9 + #if IS_ENABLED(CONFIG_RPMSG_QCOM_SMD) || IS_ENABLED(CONFIG_QCOM_SMD) 10 + 11 + struct qcom_smd_edge *qcom_smd_register_edge(struct device *parent, 12 + struct device_node *node); 13 + int qcom_smd_unregister_edge(struct qcom_smd_edge *edge); 14 + 15 + #else 16 + 17 + static inline struct qcom_smd_edge * 18 + qcom_smd_register_edge(struct device *parent, 19 + struct device_node *node) 20 + { 21 + return ERR_PTR(-ENXIO); 22 + } 23 + 24 + static inline int qcom_smd_unregister_edge(struct qcom_smd_edge *edge) 25 + { 26 + /* This shouldn't be possible */ 27 + WARN_ON(1); 28 + return -ENXIO; 29 + } 30 + 31 + #endif 32 + 33 + #endif