GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / drivers / staging / dream / include / mach / msm_smd.h
blobab1f007b7ec00392c0411085af1f771e24b8062a
1 /* linux/include/asm-arm/arch-msm/msm_smd.h
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
17 #ifndef __ASM_ARCH_MSM_SMD_H
18 #define __ASM_ARCH_MSM_SMD_H
20 typedef struct smd_channel smd_channel_t;
22 /* warning: notify() may be called before open returns */
23 int smd_open(const char *name, smd_channel_t **ch, void *priv,
24 void (*notify)(void *priv, unsigned event));
26 #define SMD_EVENT_DATA 1
27 #define SMD_EVENT_OPEN 2
28 #define SMD_EVENT_CLOSE 3
30 int smd_close(smd_channel_t *ch);
32 /* passing a null pointer for data reads and discards */
33 int smd_read(smd_channel_t *ch, void *data, int len);
35 /* Write to stream channels may do a partial write and return
36 ** the length actually written.
37 ** Write to packet channels will never do a partial write --
38 ** it will return the requested length written or an error.
40 int smd_write(smd_channel_t *ch, const void *data, int len);
42 int smd_write_avail(smd_channel_t *ch);
43 int smd_read_avail(smd_channel_t *ch);
45 /* Returns the total size of the current packet being read.
46 ** Returns 0 if no packets available or a stream channel.
48 int smd_cur_packet_size(smd_channel_t *ch);
50 /* used for tty unthrottling and the like -- causes the notify()
51 ** callback to be called from the same lock context as is used
52 ** when it is called from channel updates
54 void smd_kick(smd_channel_t *ch);
58 typedef enum
60 SMD_PORT_DS = 0,
61 SMD_PORT_DIAG,
62 SMD_PORT_RPC_CALL,
63 SMD_PORT_RPC_REPLY,
64 SMD_PORT_BT,
65 SMD_PORT_CONTROL,
66 SMD_PORT_MEMCPY_SPARE1,
67 SMD_PORT_DATA1,
68 SMD_PORT_DATA2,
69 SMD_PORT_DATA3,
70 SMD_PORT_DATA4,
71 SMD_PORT_DATA5,
72 SMD_PORT_DATA6,
73 SMD_PORT_DATA7,
74 SMD_PORT_DATA8,
75 SMD_PORT_DATA9,
76 SMD_PORT_DATA10,
77 SMD_PORT_DATA11,
78 SMD_PORT_DATA12,
79 SMD_PORT_DATA13,
80 SMD_PORT_DATA14,
81 SMD_PORT_DATA15,
82 SMD_PORT_DATA16,
83 SMD_PORT_DATA17,
84 SMD_PORT_DATA18,
85 SMD_PORT_DATA19,
86 SMD_PORT_DATA20,
87 SMD_PORT_GPS_NMEA,
88 SMD_PORT_BRIDGE_1,
89 SMD_PORT_BRIDGE_2,
90 SMD_PORT_BRIDGE_3,
91 SMD_PORT_BRIDGE_4,
92 SMD_PORT_BRIDGE_5,
93 SMD_PORT_LOOPBACK,
94 SMD_PORT_CS_APPS_MODEM,
95 SMD_PORT_CS_APPS_DSP,
96 SMD_PORT_CS_MODEM_DSP,
97 SMD_NUM_PORTS,
98 } smd_port_id_type;
100 #endif