More Makefile cleanups, otherwise mainly noticeable are the netfilter fix
[davej-history.git] / include / linux / serio.h
blob9cb8bb52576e3c251bad356a8cfafedc28c6bb26
1 #ifndef _SERIO_H
2 #define _SERIO_H
4 /*
5 * $Id: serio.h,v 1.7 2000/06/01 11:39:46 vojtech Exp $
7 * Copyright (C) 1999 Vojtech Pavlik
9 * Sponsored by SuSE
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 * Should you need to contact me, the author, you can do so either by
28 * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
29 * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic
33 * The serial port set type ioctl.
36 #include <linux/ioctl.h>
37 #define SPIOCSTYPE _IOW('q', 0x01, unsigned long)
39 struct serio;
41 struct serio {
43 void *private;
44 void *driver;
46 unsigned long type;
47 int number;
49 int (*write)(struct serio *, unsigned char);
50 int (*open)(struct serio *);
51 void (*close)(struct serio *);
53 struct serio_dev *dev;
55 struct serio *next;
58 struct serio_dev {
60 void *private;
62 void (*interrupt)(struct serio *, unsigned char, unsigned int);
63 void (*connect)(struct serio *, struct serio_dev *dev);
64 void (*disconnect)(struct serio *);
66 struct serio_dev *next;
69 int serio_open(struct serio *serio, struct serio_dev *dev);
70 void serio_close(struct serio *serio);
71 void serio_rescan(struct serio *serio);
73 void serio_register_port(struct serio *serio);
74 void serio_unregister_port(struct serio *serio);
75 void serio_register_device(struct serio_dev *dev);
76 void serio_unregister_device(struct serio_dev *dev);
78 static __inline__ int serio_write(struct serio *serio, unsigned char data)
80 return serio->write(serio, data);
83 #define SERIO_TIMEOUT 1
84 #define SERIO_PARITY 2
86 #define SERIO_TYPE 0xff000000UL
87 #define SERIO_XT 0x00000000UL
88 #define SERIO_8042 0x01000000UL
89 #define SERIO_RS232 0x02000000UL
91 #define SERIO_PROTO 0xFFUL
92 #define SERIO_MSC 0x01
93 #define SERIO_SUN 0x02
94 #define SERIO_MS 0x03
95 #define SERIO_MP 0x04
96 #define SERIO_MZ 0x05
97 #define SERIO_MZP 0x06
98 #define SERIO_MZPP 0x07
99 #define SERIO_SUNKBD 0x10
100 #define SERIO_WARRIOR 0x18
101 #define SERIO_SPACEORB 0x19
102 #define SERIO_MAGELLAN 0x1a
103 #define SERIO_SPACEBALL 0x1b
104 #define SERIO_GUNZE 0x1c
105 #define SERIO_IFORCE 0x1d
107 #define SERIO_ID 0xff00UL
108 #define SERIO_EXTRA 0xff0000UL
110 #endif