xref: /openbmc/linux/include/linux/rpmsg/qcom_glink.h (revision ab9fdd41)
184369fbeSSuman Anna /* SPDX-License-Identifier: GPL-2.0 */
284369fbeSSuman Anna 
3caf989c3SBjorn Andersson #ifndef _LINUX_RPMSG_QCOM_GLINK_H
4caf989c3SBjorn Andersson #define _LINUX_RPMSG_QCOM_GLINK_H
5caf989c3SBjorn Andersson 
6caf989c3SBjorn Andersson #include <linux/device.h>
7caf989c3SBjorn Andersson 
8*ab9fdd41SBjorn Andersson struct qcom_glink_smem;
9caf989c3SBjorn Andersson 
108527efc5SBjorn Andersson #if IS_ENABLED(CONFIG_RPMSG_QCOM_GLINK)
118527efc5SBjorn Andersson void qcom_glink_ssr_notify(const char *ssr_name);
128527efc5SBjorn Andersson #else
qcom_glink_ssr_notify(const char * ssr_name)138527efc5SBjorn Andersson static inline void qcom_glink_ssr_notify(const char *ssr_name) {}
148527efc5SBjorn Andersson #endif
158527efc5SBjorn Andersson 
16caf989c3SBjorn Andersson #if IS_ENABLED(CONFIG_RPMSG_QCOM_GLINK_SMEM)
17caf989c3SBjorn Andersson 
18*ab9fdd41SBjorn Andersson struct qcom_glink_smem *qcom_glink_smem_register(struct device *parent,
19caf989c3SBjorn Andersson 						 struct device_node *node);
20*ab9fdd41SBjorn Andersson void qcom_glink_smem_unregister(struct qcom_glink_smem *glink);
21caf989c3SBjorn Andersson 
22caf989c3SBjorn Andersson #else
23caf989c3SBjorn Andersson 
24*ab9fdd41SBjorn Andersson static inline struct qcom_glink_smem *
qcom_glink_smem_register(struct device * parent,struct device_node * node)25caf989c3SBjorn Andersson qcom_glink_smem_register(struct device *parent,
26caf989c3SBjorn Andersson 			 struct device_node *node)
27caf989c3SBjorn Andersson {
28caf989c3SBjorn Andersson 	return NULL;
29caf989c3SBjorn Andersson }
30caf989c3SBjorn Andersson 
qcom_glink_smem_unregister(struct qcom_glink_smem * glink)31*ab9fdd41SBjorn Andersson static inline void qcom_glink_smem_unregister(struct qcom_glink_smem *glink) {}
325d1f2e3cSBjorn Andersson #endif
335d1f2e3cSBjorn Andersson 
34caf989c3SBjorn Andersson #endif
35