Linux 6.11-rc7
[linux.git] / drivers / rpmsg / qcom_glink_native.h
blob8dbec24de23e0b00a74f3ba20004ffe90cc8a61d
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (c) 2016-2017, Linaro Ltd
4 */
6 #ifndef __QCOM_GLINK_NATIVE_H__
7 #define __QCOM_GLINK_NATIVE_H__
9 #include <linux/types.h>
11 #define GLINK_FEATURE_INTENT_REUSE BIT(0)
12 #define GLINK_FEATURE_MIGRATION BIT(1)
13 #define GLINK_FEATURE_TRACER_PKT BIT(2)
15 struct qcom_glink_pipe {
16 size_t length;
18 size_t (*avail)(struct qcom_glink_pipe *glink_pipe);
20 void (*peek)(struct qcom_glink_pipe *glink_pipe, void *data,
21 unsigned int offset, size_t count);
22 void (*advance)(struct qcom_glink_pipe *glink_pipe, size_t count);
24 void (*write)(struct qcom_glink_pipe *glink_pipe,
25 const void *hdr, size_t hlen,
26 const void *data, size_t dlen);
27 void (*kick)(struct qcom_glink_pipe *glink_pipe);
30 struct device;
31 struct qcom_glink;
33 struct qcom_glink *qcom_glink_native_probe(struct device *dev,
34 unsigned long features,
35 struct qcom_glink_pipe *rx,
36 struct qcom_glink_pipe *tx,
37 bool intentless);
38 void qcom_glink_native_remove(struct qcom_glink *glink);
39 void qcom_glink_native_rx(struct qcom_glink *glink);
41 #endif