Merge tag 'gpio-v3.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw...
[linux-2.6.git] / drivers / staging / gdm72xx / gdm_sdio.h
blob216e98f31baee6facbb3a6881f4d20a785ce371c
1 /*
2 * Copyright (c) 2012 GCT Semiconductor, Inc. All rights reserved.
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
14 #ifndef __GDM_SDIO_H__
15 #define __GDM_SDIO_H__
17 #include <linux/types.h>
18 #include <linux/time.h>
20 #define MAX_NR_SDU_BUF 64
22 struct sdio_tx {
23 struct list_head list;
24 struct tx_cxt *tx_cxt;
26 u8 *buf;
27 int len;
29 void (*callback)(void *cb_data);
30 void *cb_data;
33 struct tx_cxt {
34 struct list_head free_list;
35 struct list_head sdu_list;
36 struct list_head hci_list;
37 struct timeval sdu_stamp;
39 u8 *sdu_buf;
41 spinlock_t lock;
42 int can_send;
43 int stop_sdu_tx;
46 struct sdio_rx {
47 struct list_head list;
48 struct rx_cxt *rx_cxt;
50 void (*callback)(void *cb_data, void *data, int len);
51 void *cb_data;
54 struct rx_cxt {
55 struct list_head free_list;
56 struct list_head req_list;
58 u8 *rx_buf;
60 spinlock_t lock;
63 struct sdiowm_dev {
64 struct sdio_func *func;
66 struct tx_cxt tx;
67 struct rx_cxt rx;
69 struct work_struct ws;
72 #endif /* __GDM_SDIO_H__ */