diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/isdn/capilli.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/linux/isdn/capilli.h')
-rw-r--r-- | include/linux/isdn/capilli.h | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/include/linux/isdn/capilli.h b/include/linux/isdn/capilli.h new file mode 100644 index 000000000000..35e9b0fd014b --- /dev/null +++ b/include/linux/isdn/capilli.h | |||
@@ -0,0 +1,113 @@ | |||
1 | /* $Id: capilli.h,v 1.1.2.2 2004/01/16 21:09:27 keil Exp $ | ||
2 | * | ||
3 | * Kernel CAPI 2.0 Driver Interface for Linux | ||
4 | * | ||
5 | * Copyright 1999 by Carsten Paeth <calle@calle.de> | ||
6 | * | ||
7 | * This software may be used and distributed according to the terms | ||
8 | * of the GNU General Public License, incorporated herein by reference. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #ifndef __CAPILLI_H__ | ||
13 | #define __CAPILLI_H__ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/list.h> | ||
17 | #include <linux/capi.h> | ||
18 | #include <linux/kernelcapi.h> | ||
19 | |||
20 | typedef struct capiloaddatapart { | ||
21 | int user; /* data in userspace ? */ | ||
22 | int len; | ||
23 | unsigned char *data; | ||
24 | } capiloaddatapart; | ||
25 | |||
26 | typedef struct capiloaddata { | ||
27 | capiloaddatapart firmware; | ||
28 | capiloaddatapart configuration; | ||
29 | } capiloaddata; | ||
30 | |||
31 | typedef struct capicardparams { | ||
32 | unsigned int port; | ||
33 | unsigned irq; | ||
34 | int cardtype; | ||
35 | int cardnr; | ||
36 | unsigned int membase; | ||
37 | } capicardparams; | ||
38 | |||
39 | struct capi_ctr { | ||
40 | /* filled in before calling attach_capi_ctr */ | ||
41 | struct module *owner; | ||
42 | void *driverdata; /* driver specific */ | ||
43 | char name[32]; /* name of controller */ | ||
44 | char *driver_name; /* name of driver */ | ||
45 | int (*load_firmware)(struct capi_ctr *, capiloaddata *); | ||
46 | void (*reset_ctr)(struct capi_ctr *); | ||
47 | void (*register_appl)(struct capi_ctr *, u16 appl, | ||
48 | capi_register_params *); | ||
49 | void (*release_appl)(struct capi_ctr *, u16 appl); | ||
50 | u16 (*send_message)(struct capi_ctr *, struct sk_buff *skb); | ||
51 | |||
52 | char *(*procinfo)(struct capi_ctr *); | ||
53 | int (*ctr_read_proc)(char *page, char **start, off_t off, | ||
54 | int count, int *eof, struct capi_ctr *card); | ||
55 | |||
56 | /* filled in before calling ready callback */ | ||
57 | u8 manu[CAPI_MANUFACTURER_LEN]; /* CAPI_GET_MANUFACTURER */ | ||
58 | capi_version version; /* CAPI_GET_VERSION */ | ||
59 | capi_profile profile; /* CAPI_GET_PROFILE */ | ||
60 | u8 serial[CAPI_SERIAL_LEN]; /* CAPI_GET_SERIAL */ | ||
61 | |||
62 | /* management information for kcapi */ | ||
63 | |||
64 | unsigned long nrecvctlpkt; | ||
65 | unsigned long nrecvdatapkt; | ||
66 | unsigned long nsentctlpkt; | ||
67 | unsigned long nsentdatapkt; | ||
68 | |||
69 | int cnr; /* controller number */ | ||
70 | volatile unsigned short cardstate; /* controller state */ | ||
71 | volatile int blocked; /* output blocked */ | ||
72 | int traceflag; /* capi trace */ | ||
73 | |||
74 | struct proc_dir_entry *procent; | ||
75 | char procfn[128]; | ||
76 | }; | ||
77 | |||
78 | int attach_capi_ctr(struct capi_ctr *); | ||
79 | int detach_capi_ctr(struct capi_ctr *); | ||
80 | |||
81 | void capi_ctr_ready(struct capi_ctr * card); | ||
82 | void capi_ctr_reseted(struct capi_ctr * card); | ||
83 | void capi_ctr_suspend_output(struct capi_ctr * card); | ||
84 | void capi_ctr_resume_output(struct capi_ctr * card); | ||
85 | void capi_ctr_handle_message(struct capi_ctr * card, u16 appl, struct sk_buff *skb); | ||
86 | |||
87 | // --------------------------------------------------------------------------- | ||
88 | // needed for AVM capi drivers | ||
89 | |||
90 | struct capi_driver { | ||
91 | char name[32]; /* driver name */ | ||
92 | char revision[32]; | ||
93 | |||
94 | int (*add_card)(struct capi_driver *driver, capicardparams *data); | ||
95 | |||
96 | /* management information for kcapi */ | ||
97 | struct list_head list; | ||
98 | }; | ||
99 | |||
100 | void register_capi_driver(struct capi_driver *driver); | ||
101 | void unregister_capi_driver(struct capi_driver *driver); | ||
102 | |||
103 | // --------------------------------------------------------------------------- | ||
104 | // library functions for use by hardware controller drivers | ||
105 | |||
106 | void capilib_new_ncci(struct list_head *head, u16 applid, u32 ncci, u32 winsize); | ||
107 | void capilib_free_ncci(struct list_head *head, u16 applid, u32 ncci); | ||
108 | void capilib_release_appl(struct list_head *head, u16 applid); | ||
109 | void capilib_release(struct list_head *head); | ||
110 | void capilib_data_b3_conf(struct list_head *head, u16 applid, u32 ncci, u16 msgid); | ||
111 | u16 capilib_data_b3_req(struct list_head *head, u16 applid, u32 ncci, u16 msgid); | ||
112 | |||
113 | #endif /* __CAPILLI_H__ */ | ||