Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / drivers / staging / ath6kl / include / gpio_api.h
1 //------------------------------------------------------------------------------
2 // <copyright file="gpio_api.h" company="Atheros">
3 //    Copyright (c) 2004-2010 Atheros Corporation.  All rights reserved.
4 // 
5 //
6 // Permission to use, copy, modify, and/or distribute this software for any
7 // purpose with or without fee is hereby granted, provided that the above
8 // copyright notice and this permission notice appear in all copies.
9 //
10 // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 //
18 //
19 //------------------------------------------------------------------------------
20 //==============================================================================
21 // Host-side General Purpose I/O API.
22 //
23 // Author(s): ="Atheros"
24 //==============================================================================
25 #ifndef _GPIO_API_H_
26 #define _GPIO_API_H_
27
28 /*
29  * Send a command to the Target in order to change output on GPIO pins.
30  */
31 A_STATUS wmi_gpio_output_set(struct wmi_t *wmip,
32                              A_UINT32 set_mask,
33                              A_UINT32 clear_mask,
34                              A_UINT32 enable_mask,
35                              A_UINT32 disable_mask);
36
37 /*
38  * Send a command to the Target requesting input state of GPIO pins.
39  */
40 A_STATUS wmi_gpio_input_get(struct wmi_t *wmip);
41
42 /*
43  * Send a command to the Target to change the value of a GPIO register.
44  */
45 A_STATUS wmi_gpio_register_set(struct wmi_t *wmip,
46                                A_UINT32 gpioreg_id,
47                                A_UINT32 value);
48
49 /*
50  * Send a command to the Target to fetch the value of a GPIO register.
51  */
52 A_STATUS wmi_gpio_register_get(struct wmi_t *wmip, A_UINT32 gpioreg_id);
53
54 /*
55  * Send a command to the Target, acknowledging some GPIO interrupts.
56  */
57 A_STATUS wmi_gpio_intr_ack(struct wmi_t *wmip, A_UINT32 ack_mask);
58
59 #endif /* _GPIO_API_H_ */