|
From: James S. <jsi...@us...> - 2002-07-10 18:08:08
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/mouse
In directory usw-pr-cvs1:/tmp/cvs-serv10580/linux/drivers/input/mouse
Modified Files:
amimouse.c psmouse.c rpcmouse.c
Removed Files:
Config.help Config.in inport.c logibm.c maplemouse.c
pc110pad.c sermouse.c
Log Message:
Syned to 2.5.25
Index: amimouse.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/mouse/amimouse.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- amimouse.c 22 Jan 2002 20:46:45 -0000 1.10
+++ amimouse.c 10 Jul 2002 18:08:04 -0000 1.11
@@ -1,38 +1,20 @@
/*
- * $Id$
+ * Amiga mouse driver for Linux/m68k
*
- * Copyright (c) 2000-2001 Vojtech Pavlik
+ * Copyright (c) 2000-2002 Vojtech Pavlik
*
* Based on the work of:
* Michael Rausch James Banks
* Matther Dillon David Giller
* Nathan Laredo Linus Torvalds
* Johan Myreen Jes Sorensen
- * Russel King
- */
-
-/*
- * Amiga mouse driver for Linux/m68k
+ * Russell King
*/
/*
- * 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 <vo...@uc...>, or by paper mail:
- * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation
*/
#include <linux/module.h>
@@ -70,10 +52,10 @@
dx = nx - amimouse_lastx;
dy = ny - amimouse_lasty;
- if (dx < -127) dx = (256 + nx) - lastx;
- if (dx > 127) dx = (nx - 256) - lastx;
- if (dy < -127) dy = (256 + ny) - lasty;
- if (dy > 127) dy = (ny - 256) - lasty;
+ if (dx < -127) dx = (256 + nx) - amimouse_lastx;
+ if (dx > 127) dx = (nx - 256) - amimouse_lastx;
+ if (dy < -127) dy = (256 + ny) - amimouse_lasty;
+ if (dy > 127) dy = (ny - 256) - amimouse_lasty;
amimouse_lastx = nx;
amimouse_lasty = ny;
Index: psmouse.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/mouse/psmouse.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- psmouse.c 13 Mar 2002 10:03:43 -0000 1.18
+++ psmouse.c 10 Jul 2002 18:08:04 -0000 1.19
@@ -31,6 +31,7 @@
#include <linux/input.h>
#include <linux/serio.h>
#include <linux/init.h>
+#include <linux/tqueue.h>
MODULE_AUTHOR("Vojtech Pavlik <vo...@uc...>");
MODULE_DESCRIPTION("PS/2 mouse driver");
@@ -215,8 +216,7 @@
}
if (psmouse->pktcnt == 1 && psmouse->packet[0] == PSMOUSE_RET_BAT) {
- queue_task(&psmouse->tq, &tq_immediate);
- mark_bh(IMMEDIATE_BH);
+ serio_rescan(serio);
return;
}
}
@@ -557,22 +557,6 @@
}
/*
- * psmouse_powerup() is called when we get the powerup
- * sequence - 0xaa [0x00], so that the mouse/kbd is re-probed.
- */
-
-static void psmouse_powerup(void *data)
-{
- struct psmouse *psmouse = data;
-
- if (psmouse->packet[0] == PSMOUSE_RET_BAT && (psmouse->pktcnt == 1 ||
- (psmouse->pktcnt == 2 && psmouse->packet[1] == 0x00))) {
- mdelay(40); /* FIXME!!! Wait some nicer way */
- serio_rescan(psmouse->serio);
- }
-}
-
-/*
* psmouse_connect() is a callback form the serio module when
* an unhandled serio port is found.
*/
@@ -595,8 +579,6 @@
psmouse->serio = serio;
psmouse->dev.private = psmouse;
- psmouse->tq.routine = psmouse_powerup;
- psmouse->tq.data = psmouse;
serio->private = psmouse;
Index: rpcmouse.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/mouse/rpcmouse.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- rpcmouse.c 22 Jan 2002 20:48:59 -0000 1.12
+++ rpcmouse.c 10 Jul 2002 18:08:04 -0000 1.13
@@ -1,37 +1,22 @@
/*
- * $Id$
+ * Acorn RiscPC mouse driver for Linux/ARM
*
- * Copyright (c) 2000-2001 Vojtech Pavlik
+ * Copyright (c) 2000-2002 Vojtech Pavlik
+ * Copyright (C) 1996-1998 Russell King
*
- * Based on the work of:
- * Russel King
- */
-
-/*
- * Acorn RiscPC mouse driver for Linux/ARM
*/
/*
- * 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
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
*
- * Should you need to contact me, the author, you can do so either by
- * e-mail - mail your message to <vo...@uc...>, or by paper mail:
- * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
+ * This handles the Acorn RiscPCs mouse. We basically have a couple of
+ * hardware registers that track the sensor count for the X-Y movement and
+ * another register holding the button state. On every VSYNC interrupt we read
+ * the complete state and then work out if something has changed.
*/
-
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/ptrace.h>
@@ -41,14 +26,12 @@
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/io.h>
-#include <asm/iomd.h>
+#include <asm/hardware/iomd.h>
-MODULE_AUTHOR("Vojtech Pavlik <vo...@uc...>");
+MODULE_AUTHOR("Vojtech Pavlik, Russell King");
MODULE_DESCRIPTION("Acorn RiscPC mouse driver");
MODULE_LICENSE("GPL");
-#define IOMD_MOUSEBTN 0x800C4000
-
static short rpcmouse_lastx, rpcmouse_lasty;
static struct input_dev rpcmouse_dev = {
@@ -57,7 +40,7 @@
relbit: { BIT(REL_X) | BIT(REL_Y) },
name: "Acorn RiscPC Mouse",
phys: "rpcmouse/input0",
- idbus: BUS_ISA,
+ idbus: BUS_HOST,
idvendor: 0x0005,
idproduct: 0x0001,
idversion: 0x0100,
@@ -67,9 +50,9 @@
{
short x, y, dx, dy, b;
- x = (short) inl(IOMD_MOUSEX);
- y = (short) inl(IOMD_MOUSEY);
- b = (short) inl(IOMD_MOUSEBTN);
+ x = (short) iomd_readl(IOMD_MOUSEX);
+ y = (short) iomd_readl(IOMD_MOUSEY);
+ b = (short) (__raw_readl(0xe0310000) >> 4) & 7;
dx = x - rpcmouse_lastx;
dy = y - rpcmouse_lasty;
@@ -80,15 +63,15 @@
input_report_rel(&rpcmouse_dev, REL_X, dx);
input_report_rel(&rpcmouse_dev, REL_Y, dy);
- input_report_key(&amimouse_dev, BTN_LEFT, buttons & 0x10);
- input_report_key(&amimouse_dev, BTN_MIDDLE, buttons & 0x20);
- input_report_key(&amimouse_dev, BTN_RIGHT, buttons & 0x40);
+ input_report_key(&rpcmouse_dev, BTN_LEFT, buttons & 0x10);
+ input_report_key(&rpcmouse_dev, BTN_MIDDLE, buttons & 0x20);
+ input_report_key(&rpcmouse_dev, BTN_RIGHT, buttons & 0x40);
}
static int __init rpcmouse_init(void)
{
- rpcmouse_lastx = (short) inl(IOMD_MOUSEX);
- rpcmouse_lasty = (short) inl(IOMD_MOUSEY);
+ rpcmouse_lastx = (short) iomd_readl(IOMD_MOUSEX);
+ rpcmouse_lasty = (short) iomd_readl(IOMD_MOUSEY);
if (request_irq(IRQ_VSYNCPULSE, rpcmouse_irq, SA_SHIRQ, "rpcmouse", NULL)) {
printk(KERN_ERR "rpcmouse: unable to allocate VSYNC interrupt\n");
@@ -96,7 +79,7 @@
}
input_register_device(&rpcmouse_dev);
- printk(KERN_INFO "input%d: Acorn RiscPC mouse irq %d", IRQ_VSYNCPULSE);
+ printk(KERN_INFO "input: Acorn RiscPC mouse irq %d", IRQ_VSYNCPULSE);
return 0;
}
--- Config.help DELETED ---
--- Config.in DELETED ---
--- inport.c DELETED ---
--- logibm.c DELETED ---
--- maplemouse.c DELETED ---
--- pc110pad.c DELETED ---
--- sermouse.c DELETED ---
|