Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
[pandora-kernel.git] / drivers / staging / ath6kl / include / common / gpio.h
1 //------------------------------------------------------------------------------
2 // Copyright (c) 2005-2010 Atheros Corporation.  All rights reserved.
3 //
4 //
5 // Permission to use, copy, modify, and/or distribute this software for any
6 // purpose with or without fee is hereby granted, provided that the above
7 // copyright notice and this permission notice appear in all copies.
8 //
9 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 //
17 //
18 //
19 // Author(s): ="Atheros"
20 //------------------------------------------------------------------------------
21
22 #define AR6001_GPIO_PIN_COUNT 18
23 #define AR6002_GPIO_PIN_COUNT 18
24 #define AR6003_GPIO_PIN_COUNT 28
25
26 /*
27  * Possible values for WMIX_GPIO_SET_REGISTER_CMDID.
28  * NB: These match hardware order, so that addresses can
29  * easily be computed.
30  */
31 #define GPIO_ID_OUT             0x00000000
32 #define GPIO_ID_OUT_W1TS        0x00000001
33 #define GPIO_ID_OUT_W1TC        0x00000002
34 #define GPIO_ID_ENABLE          0x00000003
35 #define GPIO_ID_ENABLE_W1TS     0x00000004
36 #define GPIO_ID_ENABLE_W1TC     0x00000005
37 #define GPIO_ID_IN              0x00000006
38 #define GPIO_ID_STATUS          0x00000007
39 #define GPIO_ID_STATUS_W1TS     0x00000008
40 #define GPIO_ID_STATUS_W1TC     0x00000009
41 #define GPIO_ID_PIN0            0x0000000a
42 #define GPIO_ID_PIN(n)          (GPIO_ID_PIN0+(n))
43
44 #define GPIO_LAST_REGISTER_ID   GPIO_ID_PIN(17)
45 #define GPIO_ID_NONE            0xffffffff