aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/soc/qcom/smd.h
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2016-08-09 20:39:19 -0400
committerAndy Gross <andy.gross@linaro.org>2016-08-23 16:46:32 -0400
commit0a0c08cae01b33b29abd24608d3800986546f0af (patch)
treec047938279e11f342f97c99cac844216284ce682 /include/linux/soc/qcom/smd.h
parent3a1281848830fcb3202cfd7ffe62d19641471d05 (diff)
soc: qcom: smd: Simplify multi channel handling
Multi-channel clients split between several drivers need a way to close individual channels, as these drivers might be removed individually. With this in place the responsibility of closing additionally opened channels to the client as well only concerning smd about the primary channel. With this approach we will only trigger removal of SMD devices based on the state of the primary channel, however we get in sync with how rpmsg works. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Andy Gross <andy.gross@linaro.org>
Diffstat (limited to 'include/linux/soc/qcom/smd.h')
-rw-r--r--include/linux/soc/qcom/smd.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/soc/qcom/smd.h b/include/linux/soc/qcom/smd.h
index 910ce1d9ba89..324b1decfffb 100644
--- a/include/linux/soc/qcom/smd.h
+++ b/include/linux/soc/qcom/smd.h
@@ -55,6 +55,7 @@ void qcom_smd_driver_unregister(struct qcom_smd_driver *drv);
55struct qcom_smd_channel *qcom_smd_open_channel(struct qcom_smd_channel *channel, 55struct qcom_smd_channel *qcom_smd_open_channel(struct qcom_smd_channel *channel,
56 const char *name, 56 const char *name,
57 qcom_smd_cb_t cb); 57 qcom_smd_cb_t cb);
58void qcom_smd_close_channel(struct qcom_smd_channel *channel);
58void *qcom_smd_get_drvdata(struct qcom_smd_channel *channel); 59void *qcom_smd_get_drvdata(struct qcom_smd_channel *channel);
59void qcom_smd_set_drvdata(struct qcom_smd_channel *channel, void *data); 60void qcom_smd_set_drvdata(struct qcom_smd_channel *channel, void *data);
60int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len); 61int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len);
@@ -83,6 +84,12 @@ qcom_smd_open_channel(struct qcom_smd_channel *channel,
83 return NULL; 84 return NULL;
84} 85}
85 86
87static inline void qcom_smd_close_channel(struct qcom_smd_channel *channel)
88{
89 /* This shouldn't be possible */
90 WARN_ON(1);
91}
92
86static inline void *qcom_smd_get_drvdata(struct qcom_smd_channel *channel) 93static inline void *qcom_smd_get_drvdata(struct qcom_smd_channel *channel)
87{ 94{
88 /* This shouldn't be possible */ 95 /* This shouldn't be possible */