Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (c) 2021, The Linux Foundation. All rights reserved.
0004  */
0005 
0006 #ifndef __QCOM_AOSS_H__
0007 #define __QCOM_AOSS_H__
0008 
0009 #include <linux/err.h>
0010 #include <linux/device.h>
0011 
0012 struct qmp;
0013 
0014 #if IS_ENABLED(CONFIG_QCOM_AOSS_QMP)
0015 
0016 int qmp_send(struct qmp *qmp, const void *data, size_t len);
0017 struct qmp *qmp_get(struct device *dev);
0018 void qmp_put(struct qmp *qmp);
0019 
0020 #else
0021 
0022 static inline int qmp_send(struct qmp *qmp, const void *data, size_t len)
0023 {
0024     return -ENODEV;
0025 }
0026 
0027 static inline struct qmp *qmp_get(struct device *dev)
0028 {
0029     return ERR_PTR(-ENODEV);
0030 }
0031 
0032 static inline void qmp_put(struct qmp *qmp)
0033 {
0034 }
0035 
0036 #endif
0037 
0038 #endif