^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0-only */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * PCC (Platform Communications Channel) methods
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #ifndef _PCC_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) #define _PCC_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) #include <linux/mailbox_controller.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/mailbox_client.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define MAX_PCC_SUBSPACES 256
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #ifdef CONFIG_PCC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) extern struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) int subspace_id);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) extern void pcc_mbox_free_channel(struct mbox_chan *chan);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) static inline struct mbox_chan *pcc_mbox_request_channel(struct mbox_client *cl,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) int subspace_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) return ERR_PTR(-ENODEV);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) static inline void pcc_mbox_free_channel(struct mbox_chan *chan) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #endif /* _PCC_H */