forked from torvalds/linux
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
soc: qcom: aoss: Expose send for generic usecase
Not all upcoming usecases will have an interface to allow the aoss driver to hook onto. Expose the send api and create a get function to enable drivers to send their own messages to aoss. Signed-off-by: Chris Lew <clew@codeaurora.org> Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
- Loading branch information
1 parent
17e7124
commit 57a0c1a
Showing
2 changed files
with
82 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-only */ | ||
/* | ||
* Copyright (c) 2020, The Linux Foundation. All rights reserved. | ||
*/ | ||
|
||
#ifndef __QCOM_AOSS_H__ | ||
#define __QCOM_AOSS_H__ | ||
|
||
#include <linux/err.h> | ||
#include <linux/device.h> | ||
|
||
struct qmp; | ||
|
||
#if IS_ENABLED(CONFIG_QCOM_AOSS_QMP) | ||
|
||
int qmp_send(struct qmp *qmp, const void *data, size_t len); | ||
struct qmp *qmp_get(struct device *dev); | ||
|
||
#else | ||
|
||
static inline int qmp_send(struct qmp *qmp, const void *data, size_t len) | ||
{ | ||
return -ENODEV; | ||
} | ||
|
||
static inline struct qmp *qmp_get(struct device *dev) | ||
{ | ||
return ERR_PTR(-ENODEV); | ||
} | ||
|
||
#endif | ||
|
||
#endif |