Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh...
[pandora-kernel.git] / drivers / staging / cxt1e1 / sbew_ioc.h
1 /*
2  * $Id: sbew_ioc.h,v 1.0 2005/09/28 00:10:10 rickd PMCC4_3_1B $
3  */
4
5 #ifndef _INC_SBEWIOC_H_
6 #define _INC_SBEWIOC_H_
7
8 /*-----------------------------------------------------------------------------
9  * sbew_ioc.h -
10  *
11  * Copyright (C) 2002-2005  SBE, Inc.
12  *
13  *   This program is free software; you can redistribute it and/or modify
14  *   it under the terms of the GNU General Public License as published by
15  *   the Free Software Foundation; either version 2 of the License, or
16  *   (at your option) any later version.
17  *
18  *   This program is distributed in the hope that it will be useful,
19  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
20  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  *   GNU General Public License for more details.
22  *
23  * For further information, contact via email: support@sbei.com
24  * SBE, Inc.  San Ramon, California  U.S.A.
25  *
26  *-----------------------------------------------------------------------------
27  * RCS info:
28  * RCS revision: $Revision: 1.0 $
29  * Last changed on $Date: 2005/09/28 00:10:10 $
30  * Changed by $Author: rickd $
31  *-----------------------------------------------------------------------------
32  * $Log: sbew_ioc.h,v $
33  * Revision 1.0  2005/09/28 00:10:10  rickd
34  * Initial revision
35  *
36  * Revision 1.6  2005/01/11 18:41:01  rickd
37  * Add BRDADDR_GET Ioctl.
38  *
39  * Revision 1.5  2004/09/16 18:55:59  rickd
40  * Start setting up for generic framer configuration Ioctl by switch
41  * from tect3_framer_param[] to sbecom_framer_param[].
42  *
43  * Revision 1.4  2004/06/28 17:58:15  rickd
44  * Rename IOC_TSMAP_[GS] to IOC_TSIOC_[GS] to support need for
45  * multiple formats of data when setting up TimeSlots.
46  *
47  * Revision 1.3  2004/06/22 21:18:13  rickd
48  * read_vec now() ONLY handles a single common wrt_vec array.
49  *
50  * Revision 1.1  2004/06/10 18:11:34  rickd
51  * Add IID_GET Ioctl reference.
52  *
53  * Revision 1.0  2004/06/08 22:59:38  rickd
54  * Initial revision
55  *
56  * Revision 2.0  2004/06/07 17:49:47  rickd
57  * Initial library release following merge of wanc1t3/wan256 into
58  * common elements for lib.
59  *
60  *-----------------------------------------------------------------------------
61  */
62
63 #ifndef __KERNEL__
64 #include <sys/types.h>
65 #endif
66 #ifdef SunOS
67 #include <sys/ioccom.h>
68 #else
69 #include <linux/ioctl.h>
70 #endif
71
72 #ifdef __cplusplus
73 extern      "C"
74 {
75 #endif
76
77 #define SBE_LOCKFILE   "/tmp/.sbewan.LCK"
78
79 #define SBE_IOC_COOKIE     0x19780926
80 #define SBE_IOC_MAGIC      ('s')
81
82 /* IOW write - data has to go into driver from application */
83 /* IOR read - data has to be returned to application from driver */
84
85 /*
86  * Note: for an IOWR Ioctl, the read and write data do not have to
87  * be the same size, but the entity declared within the IOC must be
88  * the larger of the two.
89  */
90
91 #define SBE_IOC_LOGLEVEL       _IOW(SBE_IOC_MAGIC, 0x00, int)
92 #define SBE_IOC_CHAN_NEW       _IOW(SBE_IOC_MAGIC, 0x01,int)    /* unused */
93 #define SBE_IOC_CHAN_UP        _IOW(SBE_IOC_MAGIC, 0x02,int)    /* unused */
94 #define SBE_IOC_CHAN_DOWN      _IOW(SBE_IOC_MAGIC, 0x03,int)    /* unused */
95 #define SBE_IOC_CHAN_GET       _IOWR(SBE_IOC_MAGIC,0x04, struct sbecom_chan_param)
96 #define SBE_IOC_CHAN_SET       _IOW(SBE_IOC_MAGIC, 0x05, struct sbecom_chan_param)
97 #define SBE_IOC_CHAN_GET_STAT  _IOWR(SBE_IOC_MAGIC,0x06, struct sbecom_chan_stats)
98 #define SBE_IOC_CHAN_DEL_STAT  _IOW(SBE_IOC_MAGIC, 0x07, int)
99 #define SBE_IOC_PORTS_ENABLE   _IOW(SBE_IOC_MAGIC, 0x0A, int)
100 #define SBE_IOC_PORT_GET       _IOWR(SBE_IOC_MAGIC,0x0C, struct sbecom_port_param)
101 #define SBE_IOC_PORT_SET       _IOW(SBE_IOC_MAGIC, 0x0D, struct sbecom_port_param)
102 #define SBE_IOC_READ_VEC       _IOWR(SBE_IOC_MAGIC,0x10, struct sbecom_wrt_vec)
103 #define SBE_IOC_WRITE_VEC      _IOWR(SBE_IOC_MAGIC,0x11, struct sbecom_wrt_vec)
104 #define SBE_IOC_GET_SN         _IOR(SBE_IOC_MAGIC, 0x12, u_int32_t)
105 #define SBE_IOC_RESET_DEV      _IOW(SBE_IOC_MAGIC, 0x13, int)
106 #define SBE_IOC_FRAMER_GET     _IOWR(SBE_IOC_MAGIC,0x14, struct sbecom_framer_param)
107 #define SBE_IOC_FRAMER_SET     _IOW(SBE_IOC_MAGIC, 0x15, struct sbecom_framer_param)
108 #define SBE_IOC_CARD_GET       _IOR(SBE_IOC_MAGIC, 0x20, struct sbecom_card_param)
109 #define SBE_IOC_CARD_SET       _IOW(SBE_IOC_MAGIC, 0x21, struct sbecom_card_param)
110 #define SBE_IOC_CARD_GET_STAT  _IOR(SBE_IOC_MAGIC, 0x22, struct temux_card_stats)
111 #define SBE_IOC_CARD_DEL_STAT  _IO(SBE_IOC_MAGIC,  0x23)
112 #define SBE_IOC_CARD_CHAN_STAT _IOR(SBE_IOC_MAGIC, 0x24, struct sbecom_chan_stats)
113 #define SBE_IOC_CARD_BLINK     _IOW(SBE_IOC_MAGIC, 0x30, int)
114 #define SBE_IOC_DRVINFO_GET    _IOWR(SBE_IOC_MAGIC,0x31, struct sbe_drv_info)
115 #define SBE_IOC_BRDINFO_GET    _IOR(SBE_IOC_MAGIC, 0x32, struct sbe_brd_info)
116 #define SBE_IOC_IID_GET        _IOWR(SBE_IOC_MAGIC,0x33, struct sbe_iid_info)
117 #define SBE_IOC_BRDADDR_GET    _IOWR(SBE_IOC_MAGIC, 0x34, struct sbe_brd_addr)
118
119 #ifdef NOT_YET_COMMON
120 #define SBE_IOC_TSIOC_GET      _IOWR(SBE_IOC_MAGIC,0x16, struct wanc1t3_ts_param)
121 #define SBE_IOC_TSIOC_SET      _IOW(SBE_IOC_MAGIC, 0x17, struct wanc1t3_ts_param)
122 #endif
123
124 /*
125  * Restrict SBE_IOC_WRITE_VEC & READ_VEC to a single parameter pair, application
126  * then must issue multiple Ioctls for large blocks of contiguous data.
127  */
128
129 #define SBE_IOC_MAXVEC    1
130
131
132 #ifdef __cplusplus
133 }
134 #endif
135
136 #endif                          /*** _INC_SBEWIOC_H_ ***/