Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8fc94723 authored by Bjorn Andersson's avatar Bjorn Andersson
Browse files

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: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 7bdc9650
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -25,6 +25,7 @@
#include <linux/soc/qcom/smem.h>
#include <linux/soc/qcom/smem.h>
#include <linux/wait.h>
#include <linux/wait.h>
#include <linux/rpmsg.h>
#include <linux/rpmsg.h>
#include <linux/rpmsg/qcom_smd.h>


#include "rpmsg_internal.h"
#include "rpmsg_internal.h"


+33 −0
Original line number Original line Diff line number Diff line

#ifndef _LINUX_RPMSG_QCOM_SMD_H
#define _LINUX_RPMSG_QCOM_SMD_H

#include <linux/device.h>

struct qcom_smd_edge;

#if IS_ENABLED(CONFIG_RPMSG_QCOM_SMD) || IS_ENABLED(CONFIG_QCOM_SMD)

struct qcom_smd_edge *qcom_smd_register_edge(struct device *parent,
					     struct device_node *node);
int qcom_smd_unregister_edge(struct qcom_smd_edge *edge);

#else

static inline struct qcom_smd_edge *
qcom_smd_register_edge(struct device *parent,
		       struct device_node *node)
{
	return ERR_PTR(-ENXIO);
}

static inline int qcom_smd_unregister_edge(struct qcom_smd_edge *edge)
{
	/* This shouldn't be possible */
	WARN_ON(1);
	return -ENXIO;
}

#endif

#endif