patch-2.1.79 linux/drivers/sbus/char/sunserial.h

Next file: linux/drivers/sbus/char/zs.c
Previous file: linux/drivers/sbus/char/sunserial.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.78/linux/drivers/sbus/char/sunserial.h linux/drivers/sbus/char/sunserial.h
@@ -1,5 +1,5 @@
-/* $Id: sunserial.h,v 1.13 1997/09/03 11:55:00 ecd Exp $
- * sunserial.h: SUN serial driver infrastructure.
+/* $Id: sunserial.h,v 1.17 1997/12/19 07:33:12 ecd Exp $
+ * sunserial.h: SUN serial driver infrastructure (including keyboards).
  *
  * Copyright (C) 1997  Eddie C. Dost  (ecd@skynet.be)
  */
@@ -7,42 +7,45 @@
 #ifndef _SPARC_SUNSERIAL_H
 #define _SPARC_SUNSERIAL_H 1
 
+#include <linux/config.h>
 #include <linux/tty.h>
-
-struct rs_initfunc {
-	int	(*rs_init) (void);
-	struct rs_initfunc *next;
+#include <linux/kd.h>
+#include <linux/kbd_kern.h>
+#include <linux/console.h>
+
+struct initfunc {
+	int		(*init) (void);
+	struct initfunc *next;
 };
 
 struct sunserial_operations {
-	struct rs_initfunc	*rs_init;
-	void	(*rs_cons_hook) (int, int, int);
-	void	(*rs_kgdb_hook) (int);
-	void	(*rs_change_mouse_baud) (int);
-	int	(*rs_read_proc) (char *, char **, off_t, int, int *, void *);
+	struct initfunc	*rs_init;
+	void		(*rs_kgdb_hook) (int);
+	void		(*rs_change_mouse_baud) (int);
+	int		(*rs_read_proc) (char *, char **, off_t, int, int *, void *);
 };
 
-/*
- * XXX: Work in progress, don't worry this will go away in a few days. (ecd)
- * 
- * To support multiple keyboards in one binary we have to take care
- * about (at least) the following:
- * 
- * int	shift_state;
- * 
- * char	*func_buf;
- * char	*func_bufptr;
- * int	 funcbufsize;
- * int	 funcbufleft;
- * char	**func_table;
- * 
- * XXX: keymaps need to be handled...
- * 
- * struct kbd_struct	*kbd_table;
- * int	(*kbd_init)(void);
- */
+struct sunkbd_operations {
+	struct initfunc	*kbd_init;
+	void		(*compute_shiftstate) (void);
+	void		(*setledstate) (struct kbd_struct *, unsigned int);
+	unsigned char	(*getledstate) (void);
+	int		(*setkeycode) (unsigned int, unsigned int);
+	int		(*getkeycode) (unsigned int);
+};
 
 extern struct sunserial_operations rs_ops;
+extern struct sunkbd_operations kbd_ops;
+
 extern void sunserial_setinitfunc(unsigned long *, int (*) (void));
+extern void sunkbd_setinitfunc(unsigned long *, int (*) (void));
+
+extern int serial_console;
+extern void sunserial_console_termios(struct console *);
+
+#ifdef CONFIG_PCI
+extern void sunkbd_install_keymaps(unsigned long *, ushort **, unsigned int, char *,
+				   char **, int, int, struct kbdiacr *, unsigned int);
+#endif
 
 #endif /* !(_SPARC_SUNSERIAL_H) */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov