Skip to contentSkip to conversation

2.4.24-pre3 obmouse driver for HP OB600 C/CT laptop

PATCH In review Grant Grundler 2 participants 4 messages Jan 5, 2004 – Jan 9, 2004 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.4.24-pre3 obmouse driver for HP OB600 C/CT laptop

Hi Alessandro, et al,

Over Christmas break I got obmouse driver working with XF86 4.2.x and properly integrated into the linux-2.4 kernel tree.
HP Omnibook 600C/CT laptops are small, slow, fairly old (predate Cardbus but have custom PCMCIA controller), very cute laptops. The "pop-up" mouse is driven by HP proprietary silicon.

Original obmouse driver was written by Olivier Florent in 1999. (None of his original code remains.)

Kudos to Alan Cox for writing Documentation/DocBook/mousedrivers.tmpl. Made the conversion pretty simple (< 1 days work). Previous obmouse versions only worked with XF86 3.x and emulated a "microsoft" mouse. Converting to BusMouse protocol cut a few more hundred lines out of the driver.

A minor number needs to be officially assigned/blessed and entered into Documentation/devices.txt. I tested with minor number 16 and bumped up NR_MICE in busmouse.c to 17. Obmouse driver could share a minor number with another "non-serial" mouse driver since the Pop-Up mouse is a built-in device and will never conflict with say an amigamouse or atarimouse. Obmouse could conflict a parallel port, serial, or ISA-bus mouse. I was guessing the busmouse subsystem maintainer (Alessandro Rubini) would determine what is right.

Also, one "unfixable" bug is the lack of a probe routine. Without documentation, I have no clue if it's possible to probe for a pop-up mouse or not. Maybe it will be obvious to someone else based on the 4 defined registers.

XF86Config-4 file and prebuilt 2.4.24-preX kernel bits suitable for OB600CT (486, 75Mhz, 24MB RAM) are available from:

	ftp://gsyprf10.external.hp.com/kernels/ob600/

(prerelease versions of ob600_ss.c PCMCIA driver are also available there.
Michael Teske got it working on his OB600C with a 2.2 kernel; I'm not able to reproduce his success on the OB600CT I've got.)

diffstat says:

 Documentation/Configure.help |    9 +
 drivers/char/Config.in       |    1 
 drivers/char/Makefile        |    1 
 drivers/char/busmouse.c      |    2 
 drivers/char/obmouse.c       |  354 +++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 366 insertions(+), 1 deletion(-)

thanks,
grant

Documentation/Configure.help +9 -0
diff -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/Documentation/Configure.help ob600-linux-2.4/Documentation/Configure.help
@@ -19234,6 +19234,15 @@
   say M here and read <file:Documentation/modules.txt>.  The module
   will be called pc110pad.o.
 
+HP OB600 C/CT Pop-Up Mouse
+CONFIG_OBMOUSE
+  Only add this driver if you have an Omnibook 600C or 600CT laptop.
+  This driver has no probe routine and must assume ports 0x238-23b
+  belong to the Pop-Up mouse. Depends on BUSMOUSE.
+
+  Best is to use a module and load the obmouse driver at runtime.
+  Say M here and read <file:Documentation/modules.txt>.
+
 Microsoft busmouse support
 CONFIG_MS_BUSMOUSE
   These animals (also called Inport mice) are connected to an
drivers/char/Config.in +1 -0
diff -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/drivers/char/Config.in ob600-linux-2.4/drivers/char/Config.in
@@ -197,6 +197,7 @@
    dep_tristate '  ATIXL busmouse support' CONFIG_ATIXL_BUSMOUSE $CONFIG_BUSMOUSE
    dep_tristate '  Logitech busmouse support' CONFIG_LOGIBUSMOUSE $CONFIG_BUSMOUSE
    dep_tristate '  Microsoft busmouse support' CONFIG_MS_BUSMOUSE $CONFIG_BUSMOUSE
+   dep_tristate '  HP OB600 popup mouse support' CONFIG_OBMOUSE $CONFIG_BUSMOUSE
    if [ "$CONFIG_ADB" = "y" -a "$CONFIG_ADB_KEYBOARD" = "y" ]; then
       dep_tristate '  Apple Desktop Bus mouse support (old driver)' CONFIG_ADBMOUSE $CONFIG_BUSMOUSE
    fi
drivers/char/Makefile +1 -0
diff -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/drivers/char/Makefile ob600-linux-2.4/drivers/char/Makefile
@@ -226,6 +226,7 @@
 
 obj-$(CONFIG_ATIXL_BUSMOUSE) += atixlmouse.o
 obj-$(CONFIG_LOGIBUSMOUSE) += logibusmouse.o
+obj-$(CONFIG_OBMOUSE) += obmouse.o
 obj-$(CONFIG_PRINTER) += lp.o
 obj-$(CONFIG_TIPAR) += tipar.o
 
drivers/char/busmouse.c +1 -1
diff -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/drivers/char/busmouse.c ob600-linux-2.4/drivers/char/busmouse.c
@@ -49,7 +49,7 @@
 	int			dypos;
 };
 
-#define NR_MICE			15
+#define NR_MICE			17
 #define FIRST_MOUSE		0
 #define DEV_TO_MOUSE(dev)	MINOR_TO_MOUSE(MINOR(dev))
 #define MINOR_TO_MOUSE(minor)	((minor) - FIRST_MOUSE)
drivers/char/obmouse.c +354 -0

354 lines not on this page · raw message

#1 lore raw
Quoted 2 lines · Grant Grundler

Over Christmas break I got obmouse driver working with XF86 4.2.x and properly integrated into the linux-2.4 kernel tree.

At Helge Deller's suggestion, I converted obmouse to use /dev/input instead of busmouse support. v0.7 obmouse.c patch appended below. Works with 2.4.25-pre4 fine.

Marcelo, can you please include obmouse driver patch?

 Documentation/Configure.help              |   10 
 MAINTAINERS                               |    6 
 drivers/char/Config.in                    |    1 
 drivers/char/Makefile                     |    1 
 drivers/char/obmouse.c                    |  321 ++++++++++++++++++++++++++++++
 6 files changed, 342 insertions(+), 3 deletions(-)

I've added myself to MAINTAINERS.
Fixed some typos in input-programming.txt.
The rest is new driver and integration.

Quoted 2 lines

A minor number needs to be officially assigned/blessed and entered into Documentation/devices.txt.

Whee! Not a problem anymore. :^)

Quoted 4 lines

Also, one "unfixable" bug is the lack of a probe routine. Without documentation, I have no clue if it's possible to probe for a pop-up mouse or not. Maybe it will be obvious to someone else based on the 4 defined registers.

Still a problem. :^(

Quoted 3 lines

XF86Config-4 file and prebuilt 2.4.24-preX kernel bits suitable for OB600CT (486, 75Mhz, 24MB RAM) are available from:

	ftp://gsyprf10.external.hp.com/kernels/ob600/

2.4.25-pre4.tgz is now available which includes obmouse v0.7.

thanks,
grant

Documentation/Configure.help +10 -0
diff -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/Documentation/Configure.help input-linux-2.4/Documentation/Configure.help
@@ -14879,6 +14879,16 @@
 
   If unsure, say Y.
 
+HP OB600 C/CT Pop-Up Mouse
+CONFIG_OBMOUSE
+  Only add this driver if you have an Omnibook 600C or 600CT laptop.
+  This driver has no probe routine and must assume ports 0x238-23b
+  belong to the Pop-Up mouse. Depends on CONFIG_INPUT_MOUSEDEV.
+
+  Best is to use a module and load the obmouse driver at runtime.
+  Say M here and read <file:Documentation/modules.txt>.
+
+
 Input core support
 CONFIG_INPUT
   Say Y here if you want to enable any of the following options for
MAINTAINERS +6 -0
diff -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/MAINTAINERS input-linux-2.4/MAINTAINERS
@@ -436,6 +436,12 @@
 L:     [email protected]
 S:      Odd Fixes
 
+HP OMNIBOOK 600 C/CT POP-UP MOUSE DRIVER
+P:      Grant Grundler
+M:      [email protected]
+L:	[email protected]
+S:      Maintained
+
 
 HP SMART2 RAID DRIVER
 P:     Francis Wiran
drivers/char/Config.in +1 -0
diff -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/drivers/char/Config.in input-linux-2.4/drivers/char/Config.in
@@ -399,6 +399,7 @@
 
 if [ "$CONFIG_X86" = "y" ]; then
    tristate 'ACP Modem (Mwave) support' CONFIG_MWAVE
+   dep_tristate 'HP OB600 C/CT Pop-up mouse support' CONFIG_OBMOUSE $CONFIG_INPUT_MOUSEDEV
 fi
 
 endmenu
drivers/char/Makefile +1 -0
diff -Nur --exclude=RCS --exclude=CVS --exclude=SCCS --exclude=BitKeeper --exclude=ChangeSet linux-2.4/drivers/char/Makefile input-linux-2.4/drivers/char/Makefile
@@ -228,6 +228,7 @@
 obj-$(CONFIG_LOGIBUSMOUSE) += logibusmouse.o
 obj-$(CONFIG_PRINTER) += lp.o
 obj-$(CONFIG_TIPAR) += tipar.o
+obj-$(CONFIG_OBMOUSE) += obmouse.o
 
 ifeq ($(CONFIG_INPUT),y)
 obj-y += joystick/js.o
drivers/char/obmouse.c +321 -0

321 lines not on this page · raw message

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 8 lines · Grant Grundler
Quoted 2 lines · Helge Deller

With the input-driver you can directly give the absolute coordinates (no need to do conversion yourself),

I looked at Documentation/input/* and REL_ABS can not deal with "roll-over". It's expects fixed values to define the range of motion. That's not true for obmouse.
AFAICT, only real tablets and joysticks fit that model well.

yes, maybe. I don't know obmice's details.

Quoted 3 lines

I have the feeling /dev/input is a bit more "heavy weight" based on the number of function calls in ob_interrupt. But I'm not sure it matters. This is just for fun and it works too.

Hmm, the calls are pretty fast iirc..
See also my other mail.

Helge

#5 lore raw

Sorry, this mail was meant to go to Grant directly....

Helge

Quoted 20 lines · Helge Deller
Quoted 8 lines · Grant Grundler
Quoted 2 lines · Helge Deller

With the input-driver you can directly give the absolute coordinates (no need to do conversion yourself),

I looked at Documentation/input/* and REL_ABS can not deal with "roll-over". It's expects fixed values to define the range of motion. That's not true for obmouse.
AFAICT, only real tablets and joysticks fit that model well.

yes, maybe. I don't know obmice's details.

Quoted 3 lines

I have the feeling /dev/input is a bit more "heavy weight" based on the number of function calls in ob_interrupt. But I'm not sure it matters. This is just for fun and it works too.

Hmm, the calls are pretty fast iirc..
See also my other mail.

Helge