blob: 1cc83317e7e34da05607b21070531786a559d0b3 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * PCMCIA 16-bit compatibility functions
3 *
4 * The initial developer of the original code is David A. Hinds
5 * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds
6 * are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
7 *
8 * Copyright (C) 2004 Dominik Brodowski
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 *
14 */
15
16#include <linux/config.h>
17#include <linux/module.h>
18#include <linux/init.h>
19
20#define IN_CARD_SERVICES
21#include <pcmcia/version.h>
22#include <pcmcia/cs_types.h>
23#include <pcmcia/cs.h>
24#include <pcmcia/bulkmem.h>
25#include <pcmcia/cistpl.h>
26#include <pcmcia/ds.h>
27#include <pcmcia/ss.h>
28
29#include "cs_internal.h"
30
31int pcmcia_get_first_tuple(client_handle_t handle, tuple_t *tuple)
32{
33 struct pcmcia_socket *s;
34 if (CHECK_HANDLE(handle))
35 return CS_BAD_HANDLE;
36 s = SOCKET(handle);
37 return pccard_get_first_tuple(s, handle->Function, tuple);
38}
39EXPORT_SYMBOL(pcmcia_get_first_tuple);
40
41int pcmcia_get_next_tuple(client_handle_t handle, tuple_t *tuple)
42{
43 struct pcmcia_socket *s;
44 if (CHECK_HANDLE(handle))
45 return CS_BAD_HANDLE;
46 s = SOCKET(handle);
47 return pccard_get_next_tuple(s, handle->Function, tuple);
48}
49EXPORT_SYMBOL(pcmcia_get_next_tuple);
50
51int pcmcia_get_tuple_data(client_handle_t handle, tuple_t *tuple)
52{
53 struct pcmcia_socket *s;
54 if (CHECK_HANDLE(handle))
55 return CS_BAD_HANDLE;
56 s = SOCKET(handle);
57 return pccard_get_tuple_data(s, tuple);
58}
59EXPORT_SYMBOL(pcmcia_get_tuple_data);
60
61int pcmcia_parse_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse)
62{
63 return pccard_parse_tuple(tuple, parse);
64}
65EXPORT_SYMBOL(pcmcia_parse_tuple);
66
67int pcmcia_validate_cis(client_handle_t handle, cisinfo_t *info)
68{
69 struct pcmcia_socket *s;
70 if (CHECK_HANDLE(handle))
71 return CS_BAD_HANDLE;
72 s = SOCKET(handle);
73 return pccard_validate_cis(s, handle->Function, info);
74}
75EXPORT_SYMBOL(pcmcia_validate_cis);
76
Linus Torvalds1da177e2005-04-16 15:20:36 -070077
78int pcmcia_reset_card(client_handle_t handle, client_req_t *req)
79{
80 struct pcmcia_socket *skt;
81
82 if (CHECK_HANDLE(handle))
83 return CS_BAD_HANDLE;
84 skt = SOCKET(handle);
85 if (!skt)
86 return CS_BAD_HANDLE;
87
88 return pccard_reset_card(skt);
89}
90EXPORT_SYMBOL(pcmcia_reset_card);
91