Deleted Added
full compact
mse.c (47625) mse.c (47640)
1/*
2 * Copyright 1992 by the University of Guelph
3 *
4 * Permission to use, copy and modify this
5 * software and its documentation for any purpose and without
6 * fee is hereby granted, provided that the above copyright
7 * notice appear in all copies and that both that copyright
8 * notice and this permission notice appear in supporting
9 * documentation.
10 * University of Guelph makes no representations about the suitability of
11 * this software for any purpose. It is provided "as is"
12 * without express or implied warranty.
13 *
1/*
2 * Copyright 1992 by the University of Guelph
3 *
4 * Permission to use, copy and modify this
5 * software and its documentation for any purpose and without
6 * fee is hereby granted, provided that the above copyright
7 * notice appear in all copies and that both that copyright
8 * notice and this permission notice appear in supporting
9 * documentation.
10 * University of Guelph makes no representations about the suitability of
11 * this software for any purpose. It is provided "as is"
12 * without express or implied warranty.
13 *
14 * $Id: mse.c,v 1.42 1999/05/06 18:44:02 peter Exp $
14 * $Id: mse.c,v 1.43 1999/05/30 16:52:20 phk Exp $
15 */
16/*
17 * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
18 * the X386 port, courtesy of
19 * Rick Macklem, rick@snowhite.cis.uoguelph.ca
20 * Caveats: The driver currently uses spltty(), but doesn't use any
21 * generic tty code. It could use splmse() (that only masks off the
22 * bus mouse interrupt, but that would require hacking in i386/isa/icu.s.

--- 220 unchanged lines hidden (view full) ---

243};
244
245int
246mseprobe(idp)
247 register struct isa_device *idp;
248{
249 register struct mse_softc *sc = &mse_sc[idp->id_unit];
250 register int i;
15 */
16/*
17 * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
18 * the X386 port, courtesy of
19 * Rick Macklem, rick@snowhite.cis.uoguelph.ca
20 * Caveats: The driver currently uses spltty(), but doesn't use any
21 * generic tty code. It could use splmse() (that only masks off the
22 * bus mouse interrupt, but that would require hacking in i386/isa/icu.s.

--- 220 unchanged lines hidden (view full) ---

243};
244
245int
246mseprobe(idp)
247 register struct isa_device *idp;
248{
249 register struct mse_softc *sc = &mse_sc[idp->id_unit];
250 register int i;
251 static int once;
251
252
253 if (!once++)
254 cdevsw_add(&mse_cdevsw);
252 /*
253 * Check for each mouse type in the table.
254 */
255 i = 0;
256 while (mse_types[i].m_type) {
257 if ((*mse_types[i].m_probe)(idp)) {
258 sc->sc_mousetype = mse_types[i].m_type;
259 sc->sc_enablemouse = mse_types[i].m_enable;

--- 523 unchanged lines hidden (view full) ---

783 *dx = byte;
784 outb(port + MSE_PORTA, MSE_INPORT_DY);
785 byte = inb(port + MSE_PORTB);
786 *dy = byte;
787 outb(port + MSE_PORTA, MSE_INPORT_MODE);
788 outb(port + MSE_PORTB, MSE_INPORT_INTREN);
789}
790
255 /*
256 * Check for each mouse type in the table.
257 */
258 i = 0;
259 while (mse_types[i].m_type) {
260 if ((*mse_types[i].m_probe)(idp)) {
261 sc->sc_mousetype = mse_types[i].m_type;
262 sc->sc_enablemouse = mse_types[i].m_enable;

--- 523 unchanged lines hidden (view full) ---

786 *dx = byte;
787 outb(port + MSE_PORTA, MSE_INPORT_DY);
788 byte = inb(port + MSE_PORTB);
789 *dy = byte;
790 outb(port + MSE_PORTA, MSE_INPORT_MODE);
791 outb(port + MSE_PORTB, MSE_INPORT_INTREN);
792}
793
791static int mse_devsw_installed;
792
793static void mse_drvinit(void *unused)
794{
795 dev_t dev;
796
797 if( ! mse_devsw_installed ) {
798 dev = makedev(CDEV_MAJOR, 0);
799 cdevsw_add(&dev,&mse_cdevsw, NULL);
800 mse_devsw_installed = 1;
801 }
802}
803
804SYSINIT(msedev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,mse_drvinit,NULL)
805
806
807#endif /* NMSE */
794#endif /* NMSE */