summaryrefslogtreecommitdiffstats
path: root/sys/dev/mse
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1994-10-23 21:28:03 +0000
committerwollman <wollman@FreeBSD.org>1994-10-23 21:28:03 +0000
commit7b8e09399aded7c12a148b104ccf05419e73ba88 (patch)
treec2370b235711beb410091996b92230bc38cd2a7e /sys/dev/mse
parent5727d2fc7e7202ade434ecfa3f1e91a6f714d47e (diff)
downloadFreeBSD-src-7b8e09399aded7c12a148b104ccf05419e73ba88.zip
FreeBSD-src-7b8e09399aded7c12a148b104ccf05419e73ba88.tar.gz
Finished device configuration database work for all ISA devices (except `ze')
and all SCSI devices (except that it's not done quite the way I want). New information added includes: - A text description of the device - A ``state''---unknown, unconfigured, idle, or busy - A generic parent device (with support in the m.i. code) - An interrupt mask type field (which will hopefully go away) so that . ``doconfig'' can be written This requires a new version of the `lsdev' program as well (next commit).
Diffstat (limited to 'sys/dev/mse')
-rw-r--r--sys/dev/mse/mse.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c
index 6337fde..c9b8344 100644
--- a/sys/dev/mse/mse.c
+++ b/sys/dev/mse/mse.c
@@ -11,7 +11,7 @@
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
- * $Id: mse.c,v 1.6 1994/08/13 03:50:10 wollman Exp $
+ * $Id: mse.c,v 1.7 1994/10/21 01:19:07 wollman Exp $
*/
/*
* Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
@@ -53,6 +53,7 @@
#include <sys/ioctl.h>
#include <sys/tty.h>
#include <sys/uio.h>
+#include <sys/devconf.h>
#include <i386/isa/isa_device.h>
#include <i386/isa/icu.h>
@@ -174,6 +175,26 @@ mseprobe(idp)
return (0);
}
+static struct kern_devconf kdc_mse[NMSE] = { {
+ 0, 0, 0, /* filled in by dev_attach */
+ "mse", 0, { MDDT_ISA, 0, "tty" },
+ isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
+ &kdc_isa0, /* parent */
+ 0, /* parentdata */
+ DC_UNKNOWN, /* not supported */
+ "ATI or Logitech bus mouse adapter"
+} };
+
+static inline void
+mse_registerdev(struct isa_device *id)
+{
+ if(id->id_unit)
+ kdc_mse[id->id_unit] = kdc_mse[0];
+ kdc_mse[id->id_unit].kdc_unit = id->id_unit;
+ kdc_mse[id->id_unit].kdc_isa = id;
+ dev_attach(&kdc_mse[id->id_unit]);
+}
+
int
mseattach(idp)
struct isa_device *idp;
@@ -181,6 +202,7 @@ mseattach(idp)
struct mse_softc *sc = &mse_sc[idp->id_unit];
sc->sc_port = idp->id_iobase;
+ mse_registerdev(idp);
return (1);
}
OpenPOWER on IntegriCloud