Skip to contentSkip to conversation

Stowaway 2.6.17.1

PATCH In review Marek Vašut 3 participants 3 messages Aug 5, 2006 – Aug 7, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Stowaway 2.6.17.1

Hi,
this patch adds support for stowaway and stowaway compatible (eg. dicota inutPDA) serial keyboards. I made it on kernel 2.6.16, but it applies cleanly on 2.6.17.1 too. I tested it on palm zire71 and friend reported me that it works on palm tungsten T3.

I appologize, I´m not subscribed to LKML.

Best regards
Marek Vasut

input/keyboard/Kconfig +11 -0
diff -Naur drivers-old/input/keyboard/Kconfig drivers/input/keyboard/Kconfig
@@ -121,6 +121,17 @@
 	  To compile this driver as a module, choose M here: the
 	  module will be called newtonkbd.
 
+config KEYBOARD_STOWAWAY
+	tristate "Stowaway keyboard"
+	select SERIO
+	help
+	  Say Y here if you have a Stowaway keyboard on a serial port.
+	  Stowaway compatible keyboards like Dicota Input-PDA keyboard
+	  are also supported by this driver.
+
+	  To compile this driver as a module, choose M here: the
+	  module will be called stowaway.
+
 config KEYBOARD_CORGI
 	tristate "Corgi keyboard"
 	depends on PXA_SHARPSL
input/keyboard/Makefile +1 -0
diff -Naur drivers-old/input/keyboard/Makefile drivers/input/keyboard/Makefile
@@ -11,6 +11,7 @@
 obj-$(CONFIG_KEYBOARD_AMIGA)		+= amikbd.o
 obj-$(CONFIG_KEYBOARD_LOCOMO)		+= locomokbd.o
 obj-$(CONFIG_KEYBOARD_NEWTON)		+= newtonkbd.o
+obj-$(CONFIG_KEYBOARD_STOWAWAY)		+= stowaway.o
 obj-$(CONFIG_KEYBOARD_CORGI)		+= corgikbd.o
 obj-$(CONFIG_KEYBOARD_SPITZ)		+= spitzkbd.o
 obj-$(CONFIG_KEYBOARD_HIL)		+= hil_kbd.o
input/keyboard/stowaway.c +188 -0

188 lines not on this page · raw message

This adds stowaway and compatible serial keyboard support. Marek Vasut [email protected]

#1 lore raw
Quoted 6 lines · Marek Vašut

Hi,
this patch adds support for stowaway and stowaway compatible (eg. dicota inutPDA) serial keyboards. I made it on kernel 2.6.16, but it applies cleanly on 2.6.17.1 too. I tested it on palm zire71 and friend reported me that it works on palm tungsten T3.

Hi,

Looks pretty good, I have a question though:

input/keyboard/stowaway.c line 86

Quoted 9 lines
input/keyboard/stowaway.c +9 -0
+       if (data < 0x80) {
+       /* invalid scan codes are probably the init sequence, so we ignore them */
+           if (skbd->keycode[data & SKBD_KEY]) { 
+                   input_regs(skbd->dev, regs);
+                   input_report_key(skbd->dev, skbd->keycode[data & SKBD_KEY], 1);
+                   input_sync(skbd->dev); 
+           }
+           else if (data == 0xe7) /* end of init sequence */
+                   printk(KERN_INFO "input: %s on %s\n", skbd->dev->name, serio->phys);

How does "init sequence" gets here? Normally inputattach initializes hardware and then creates proper serio port...

input/keyboard/stowaway.c line 135

Quoted 6 lines
input/keyboard/stowaway.c +6 -0
+       err = serio_open(serio, drv);
+       if (err)
+               goto fail;
+
+       input_register_device(skbd->dev);
+       return 0;

You need to handle errors from input_register_device() too.

Signature · 1 line
Dmitry
#2 lore raw
In reply to Marek Vašut
Quoted 2 lines · On Sat, 5 Aug 2006 21:52:05 +0200 Marek Va__ut <[email protected]> wrote:

this patch adds support for stowaway and stowaway compatible (eg. dicota inutPDA) serial keyboards.

Please review section 11 of Documentation/SubmittingPatches and if you find it OK, then send us a Signed-off-by:, thanks.