Skip to content

Commit 8fc9472

Browse files
committed
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>
1 parent 7bdc965 commit 8fc9472

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

drivers/rpmsg/qcom_smd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include <linux/soc/qcom/smem.h>
2626
#include <linux/wait.h>
2727
#include <linux/rpmsg.h>
28+
#include <linux/rpmsg/qcom_smd.h>
2829

2930
#include "rpmsg_internal.h"
3031

include/linux/rpmsg/qcom_smd.h

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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

0 commit comments

Comments
 (0)