diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-06-25 01:20:01 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-06-25 01:20:01 +0000 |
commit | 3797ba0b62debb71af4606910acacc9896a9ae3b (patch) | |
tree | 414eea76253c7871bfdf3bd9d1817771eb40917c /include/linux/serio.h | |
parent | 2b6c0c580795a4404f72d2a794214dd9e080709d (diff) |
Merge with Linux 2.4.0-test2.
Diffstat (limited to 'include/linux/serio.h')
-rw-r--r-- | include/linux/serio.h | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/include/linux/serio.h b/include/linux/serio.h new file mode 100644 index 000000000..9cb8bb525 --- /dev/null +++ b/include/linux/serio.h @@ -0,0 +1,110 @@ +#ifndef _SERIO_H +#define _SERIO_H + +/* + * $Id: serio.h,v 1.7 2000/06/01 11:39:46 vojtech Exp $ + * + * Copyright (C) 1999 Vojtech Pavlik + * + * Sponsored by SuSE + */ + +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Should you need to contact me, the author, you can do so either by + * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail: + * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic + */ + +/* + * The serial port set type ioctl. + */ + +#include <linux/ioctl.h> +#define SPIOCSTYPE _IOW('q', 0x01, unsigned long) + +struct serio; + +struct serio { + + void *private; + void *driver; + + unsigned long type; + int number; + + int (*write)(struct serio *, unsigned char); + int (*open)(struct serio *); + void (*close)(struct serio *); + + struct serio_dev *dev; + + struct serio *next; +}; + +struct serio_dev { + + void *private; + + void (*interrupt)(struct serio *, unsigned char, unsigned int); + void (*connect)(struct serio *, struct serio_dev *dev); + void (*disconnect)(struct serio *); + + struct serio_dev *next; +}; + +int serio_open(struct serio *serio, struct serio_dev *dev); +void serio_close(struct serio *serio); +void serio_rescan(struct serio *serio); + +void serio_register_port(struct serio *serio); +void serio_unregister_port(struct serio *serio); +void serio_register_device(struct serio_dev *dev); +void serio_unregister_device(struct serio_dev *dev); + +static __inline__ int serio_write(struct serio *serio, unsigned char data) +{ + return serio->write(serio, data); +} + +#define SERIO_TIMEOUT 1 +#define SERIO_PARITY 2 + +#define SERIO_TYPE 0xff000000UL +#define SERIO_XT 0x00000000UL +#define SERIO_8042 0x01000000UL +#define SERIO_RS232 0x02000000UL + +#define SERIO_PROTO 0xFFUL +#define SERIO_MSC 0x01 +#define SERIO_SUN 0x02 +#define SERIO_MS 0x03 +#define SERIO_MP 0x04 +#define SERIO_MZ 0x05 +#define SERIO_MZP 0x06 +#define SERIO_MZPP 0x07 +#define SERIO_SUNKBD 0x10 +#define SERIO_WARRIOR 0x18 +#define SERIO_SPACEORB 0x19 +#define SERIO_MAGELLAN 0x1a +#define SERIO_SPACEBALL 0x1b +#define SERIO_GUNZE 0x1c +#define SERIO_IFORCE 0x1d + +#define SERIO_ID 0xff00UL +#define SERIO_EXTRA 0xff0000UL + +#endif |