Hoan Tran | 866ae69 | 2016-06-16 14:09:38 -0700 | [diff] [blame] | 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 | |
George Cherian | c4b766c | 2017-10-11 08:54:57 +0000 | [diff] [blame] | 16 | #define MAX_PCC_SUBSPACES 256 |
Hoan Tran | 866ae69 | 2016-06-16 14:09:38 -0700 | [diff] [blame] | 17 | #ifdef CONFIG_PCC |
| 18 | extern struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl, |
| 19 | int subspace_id); |
| 20 | extern void pcc_mbox_free_channel(struct mbox_chan *chan); |
| 21 | #else |
| 22 | static inline struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl, |
| 23 | int subspace_id) |
| 24 | { |
Hoan Tran | d0679cf | 2016-10-14 16:20:21 -0700 | [diff] [blame] | 25 | return ERR_PTR(-ENODEV); |
Hoan Tran | 866ae69 | 2016-06-16 14:09:38 -0700 | [diff] [blame] | 26 | } |
| 27 | static inline void pcc_mbox_free_channel(struct mbox_chan *chan) { } |
| 28 | #endif |
| 29 | |
| 30 | #endif /* _PCC_H */ |