Input: sprd_eic_keys: remove event log
[profile/mobile/platform/kernel/linux-3.10-sc7730.git] / drivers / sipc / sctrl.h
1 /*
2  * Copyright (C) 2012 Spreadtrum Communications Inc.
3  *
4  * This software is licensed under the terms of the GNU General Public
5  * License version 2, as published by the Free Software Foundation, and
6  * may be copied, distributed, and modified under those terms.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  */
13
14 #ifndef __SCTRL_H
15 #define __SCTRL_H
16
17 /* flag for CMD/DONE msg type */
18 #define SMSG_CMD_SBUF_INIT      0x0001
19 #define SMSG_DONE_SBUF_INIT     0x0002
20
21 /* flag for EVENT msg type */
22 #define SMSG_EVENT_SBUF_WRPTR   0x0001
23 #define SMSG_EVENT_SBUF_RDPTR   0x0002
24 #define SCTL_STATE_IDLE         0
25 #define SCTL_STATE_READY        1
26 #define SCTL_STATE_REV_CMPT    2
27
28 struct sctrl_mgr {
29         uint8_t                 dst;
30         uint8_t                 channel;
31         uint32_t                state;
32         wait_queue_head_t tx_pending;
33         wait_queue_head_t rx_pending;
34         struct task_struct      *thread;
35 };
36
37 struct sctrl_device {
38         struct spipe_init_data  *init;
39         int                     major;
40         int                     minor;
41         struct cdev             cdev;
42 };
43
44 struct sctrl_buf {
45         uint8_t                 dst;
46         uint8_t                 channel;
47         uint32_t                bufid;
48 };
49
50 #endif