usb: gadget: g_ffs: Allow to set bmAttributes of configuration
[profile/mobile/platform/kernel/linux-3.10-sc7730.git] / drivers / char / ts0710_mux.h
1 /*
2  * mux_macro.h
3  *
4  * Copyright (C) 2002 2005 Motorola
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  *
20  *
21  *  11/18/2002  (Motorola) - Initial version
22  *
23  */
24
25 #ifndef TS0710_MUX_H
26 #define TS0710_MUX_H
27
28 /*
29 * This header file should be included by both MUX and other applications
30 * which access MUX device files. It gives the additional macro definitions
31 * shared between MUX and applications.
32 */
33
34 /* MUX DLCI(Data Link Connection Identifier) Configuration */
35 /*
36 *  DLCI     Service
37 *   0    Control Channel
38 *   1    Voice Call & Network-related
39 *   2    SMS MO
40 *   3    SMS MT
41 *   4    Phonebook & related
42 *   5    MISC
43 *   6    CSD/FAX
44 *   7    GPRS1
45 *   8    GPRS2
46 *   9    Logger CMD
47 *   10   Logger Data
48 *   11   Test CMD
49 *   12   AGPS
50 *   13   Net Monitor
51 */
52
53 /* Mapping between DLCI and MUX device files */
54 /*
55 *   File Name   Minor  DLCI  AT Command/Data
56 *   /dev/mux0     0     1     AT Command
57 *   /dev/mux1     1     2     AT Command
58 *   /dev/mux2     2     3     AT Command
59 *   /dev/mux3     3     4     AT Command
60 *   /dev/mux4     4     5     AT Command
61 *   /dev/mux5     5     6     AT Command
62 *   /dev/mux6     6     7     AT Command
63 *   /dev/mux7     7     8     AT Command
64 *   /dev/mux8     8     6     Data
65 *   /dev/mux9     9     7     Data
66 *   /dev/mux10    10    8     Data
67 *   /dev/mux11    11    9     Data
68 *   /dev/mux12    12    10    Data
69 *   /dev/mux13    13    11    Data
70 *   /dev/mux14    14    12    Data
71 *   /dev/mux15    15    13    Data
72 */
73 #if 0
74 #define MUX_CMD_FILE_VOICE_CALL   "/dev/mux0"
75 #define MUX_CMD_FILE_SMS_MO       "/dev/mux1"
76 #define MUX_CMD_FILE_SMS_MT       "/dev/mux2"
77 #define MUX_CMD_FILE_PHONEBOOK    "/dev/mux3"
78 #define MUX_CMD_FILE_MISC         "/dev/mux4"
79 #define MUX_CMD_FILE_CSD          "/dev/mux5"
80 #define MUX_CMD_FILE_GPRS1        "/dev/mux6"
81 #define MUX_CMD_FILE_GPRS2        "/dev/mux7"
82
83 #define MUX_DATA_FILE_CSD         "/dev/mux8"
84 #define MUX_DATA_FILE_GPRS1       "/dev/mux9"
85 #define MUX_DATA_FILE_GPRS2       "/dev/mux10"
86 #define MUX_DATA_FILE_LOGGER_CMD  "/dev/mux11"
87 #define MUX_DATA_FILE_LOGGER_DATA "/dev/mux12"
88 #define MUX_DATA_FILE_TEST_CMD    "/dev/mux13"
89 #define MUX_DATA_FILE_AGPS        "/dev/mux14"
90 #define MUX_DATA_FILE_NET_MONITOR "/dev/mux15"
91
92 #define NUM_MUX_CMD_FILES 8
93 #define NUM_MUX_DATA_FILES 8
94 #define NUM_MUX_FILES ( NUM_MUX_CMD_FILES  +  NUM_MUX_DATA_FILES )
95 #endif
96 /* Special ioctl() upon a MUX device file for hanging up a call */
97 #define TS0710MUX_IO_MSC_HANGUP 0x54F0
98
99 /* Special ioctl() upon a MUX device file for MUX loopback test */
100 #define TS0710MUX_IO_TEST_CMD 0x54F1
101
102 /* Special Error code might be return from write() to a MUX device file  */
103 #define EDISCONNECTED 900       /* Logical data link is disconnected */
104
105 /* Special Error code might be return from open() to a MUX device file  */
106 #define EREJECTED 901           /* Logical data link connection request is rejected */
107
108 #endif