hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (C) 2022 Rockchip Electronics Co., Ltd
 */
 
#ifndef __SOC_ROCKCHIP_MAILBOX_H__
#define __SOC_ROCKCHIP_MAILBOX_H__
 
#include <linux/errno.h>
#include <linux/types.h>
 
struct mbox_chan;
 
struct rockchip_mbox_msg {
   u32 cmd;
   u32 data;
};
 
#if IS_REACHABLE(CONFIG_ROCKCHIP_MBOX)
int rockchip_mbox_read_msg(struct mbox_chan *chan,
              struct rockchip_mbox_msg *msg);
#else
static inline int rockchip_mbox_read_msg(struct mbox_chan *chan,
                    struct rockchip_mbox_msg *msg)
{
   return -EOPNOTSUPP;
}
#endif
 
#endif /* __SOC_ROCKCHIP_MAILBOX_H__ */