Loading...
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * PCC (Platform Communications Channel) methods
4 */
5
6#ifndef _PCC_H
7#define _PCC_H
8
9#include <linux/mailbox_controller.h>
10#include <linux/mailbox_client.h>
11
12#define MAX_PCC_SUBSPACES 256
13#ifdef CONFIG_PCC
14extern struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl,
15 int subspace_id);
16extern void pcc_mbox_free_channel(struct mbox_chan *chan);
17#else
18static inline struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl,
19 int subspace_id)
20{
21 return ERR_PTR(-ENODEV);
22}
23static inline void pcc_mbox_free_channel(struct mbox_chan *chan) { }
24#endif
25
26#endif /* _PCC_H */
1/*
2 * PCC (Platform Communications Channel) methods
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; version 2
7 * of the License.
8 */
9
10#ifndef _PCC_H
11#define _PCC_H
12
13#include <linux/mailbox_controller.h>
14#include <linux/mailbox_client.h>
15
16#ifdef CONFIG_PCC
17extern struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl,
18 int subspace_id);
19extern void pcc_mbox_free_channel(struct mbox_chan *chan);
20#else
21static inline struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl,
22 int subspace_id)
23{
24 return ERR_PTR(-ENODEV);
25}
26static inline void pcc_mbox_free_channel(struct mbox_chan *chan) { }
27#endif
28
29#endif /* _PCC_H */