All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: linux-kernel@vger.kernel.org
Cc: Vojtech Pavlik <vojtech@suse.cz>,
	Sau Dan Lee <danlee@informatik.uni-freiburg.de>,
	tuukkat@ee.oulu.fi
Subject: Re: SERIO_USERDEV patch for 2.6
Date: Sun, 30 May 2004 10:09:18 -0500	[thread overview]
Message-ID: <200405301009.21202.dtor_core@ameritech.net> (raw)
In-Reply-To: <20040530134246.GA1828@ucw.cz>

On Sunday 30 May 2004 08:42 am, Vojtech Pavlik wrote:
> 
> Anyway, looking at the patch, it's not bad, and it's quite close to what
> I was considering to write. I'd like to keep it separate from the
> serio.c file, although it's obvious it'll require to be linked to it
> statically, because it needs hooks there - it cannot be a regular serio
> driver.
> 

Do we really have to have this stuff directly in serio? How about being able
to mark some serio ports as working in raw mode (i8042.raw=0,1,1,0) and have
separate (serio_raw?) module bind to such ports

Warning - the patch below is not really tested and may not apply to Linus'
tree. 

-- 
Dmitry


===================================================================


ChangeSet@1.1743.7.10, 2004-05-29 22:19:16-05:00, dtor_core@ameritech.net
  Input: i8042 - add kernel parameter to allow mark some of AUX ports
         as raw (SERIO_8042_RAW). This will cause psmouse module ignore
         these ports and will allow bytestream driver serve data to the
         userspace.


 Documentation/kernel-parameters.txt |    2 ++
 drivers/input/serio/i8042.c         |   15 +++++++++++++--
 include/linux/serio.h               |    1 +
 3 files changed, 16 insertions(+), 2 deletions(-)


===================================================================



diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
--- a/Documentation/kernel-parameters.txt	2004-05-30 10:08:34 -05:00
+++ b/Documentation/kernel-parameters.txt	2004-05-30 10:08:34 -05:00
@@ -464,6 +464,8 @@
 	i8042.noaux	[HW] Don't check for auxiliary (== mouse) port
 	i8042.nomux	[HW] Don't check presence of an active multiplexing
 			     controller
+	i8042.raw	[HW] Specifies which AUX ports should be marked as raw
+			Format: <aux1>,<aux2>,<aux3>,<aux4>
 	i8042.reset	[HW] Reset the controller during init and cleanup
 	i8042.unlock	[HW] Unlock (ignore) the keylock
 
diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
--- a/drivers/input/serio/i8042.c	2004-05-30 10:08:34 -05:00
+++ b/drivers/input/serio/i8042.c	2004-05-30 10:08:34 -05:00
@@ -52,6 +52,11 @@
 module_param_named(dumbkbd, i8042_dumbkbd, bool, 0);
 MODULE_PARM_DESC(dumbkbd, "Pretend that controller can only read data from keyboard");
 
+static unsigned int i8042_aux_raw[4];
+static unsigned int i8042_aux_raw_nargs;
+module_param_array_named(raw, i8042_aux_raw, bool, i8042_aux_raw_nargs, 0);
+MODULE_PARM_DESC(raw, "Specifies which AUX ports should be marked as RAW");
+
 __obsolete_setup("i8042_noaux");
 __obsolete_setup("i8042_nomux");
 __obsolete_setup("i8042_unlock");
@@ -651,8 +656,9 @@
 		return -1;
 	}
 
-	printk(KERN_INFO "serio: i8042 %s port at %#lx,%#lx irq %d\n",
+	printk(KERN_INFO "serio: i8042 %s port %s at %#lx,%#lx irq %d\n",
 	       values->name,
+	       port->type == SERIO_8042_RAW ? "(raw)" : "",
 	       (unsigned long) I8042_DATA_REG,
 	       (unsigned long) I8042_COMMAND_REG,
 	       values->irq);
@@ -936,6 +942,8 @@
 	sprintf(i8042_mux_names[index], "i8042 Aux-%d Port", index);
 	sprintf(i8042_mux_phys[index], I8042_MUX_PHYS_DESC, index + 1);
 	sprintf(i8042_mux_short[index], "AUX%d", index);
+	if (i8042_aux_raw[index])
+		port->type = SERIO_8042_RAW;
 	port->name = i8042_mux_names[index];
 	port->phys = i8042_mux_phys[index];
 	port->driver = values;
@@ -970,8 +978,11 @@
 				i8042_init_mux_values(i8042_mux_values + i, i8042_mux_port + i, i);
 				i8042_port_register(i8042_mux_values + i, i8042_mux_port + i);
 			}
-		else
+		else {
+			if (i8042_aux_raw[0])
+				i8042_aux_port.type = SERIO_8042_RAW;
 			i8042_port_register(&i8042_aux_values, &i8042_aux_port);
+		}
 	}
 
 	i8042_port_register(&i8042_kbd_values, &i8042_kbd_port);
diff -Nru a/include/linux/serio.h b/include/linux/serio.h
--- a/include/linux/serio.h	2004-05-30 10:08:34 -05:00
+++ b/include/linux/serio.h	2004-05-30 10:08:34 -05:00
@@ -108,6 +108,7 @@
 #define SERIO_PC9800	0x04000000UL
 #define SERIO_PS_PSTHRU	0x05000000UL
 #define SERIO_8042_XL	0x06000000UL
+#define SERIO_8042_RAW	0x07000000UL
 
 #define SERIO_PROTO	0xFFUL
 #define SERIO_MSC	0x01

  reply	other threads:[~2004-05-30 15:09 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-30 10:39 keyboard problem with 2.6.6 Sau Dan Lee
2004-05-30 11:18 ` Vojtech Pavlik
2004-05-30 11:40   ` Sau Dan Lee
2004-05-30 11:53     ` Russell King
2004-05-30 12:43     ` Vojtech Pavlik
2004-05-30 13:25       ` Sau Dan Lee
2004-05-30 13:42         ` SERIO_USERDEV patch for 2.6 Vojtech Pavlik
2004-05-30 15:09           ` Dmitry Torokhov [this message]
2004-05-30 15:58             ` Vojtech Pavlik
2004-05-30 16:10               ` Giuseppe Bilotta
2004-05-30 21:00                 ` Vojtech Pavlik
2004-05-31 12:43                   ` Giuseppe Bilotta
2004-05-30 16:16               ` Dmitry Torokhov
2004-05-30 20:51                 ` Vojtech Pavlik
2004-05-30 23:50                   ` Dmitry Torokhov
2004-05-31  6:30                     ` Vojtech Pavlik
2004-06-01  8:18           ` Tuukka Toivonen
2004-06-03 10:21             ` [PATCH] " Tuukka Toivonen
2004-06-03 12:21               ` Sau Dan Lee
2004-06-03 13:46               ` Luciano Moreira - igLnx
2004-06-03 21:23               ` Vojtech Pavlik
2004-06-01 16:50           ` Sau Dan Lee
2004-06-01 18:18             ` Dmitry Torokhov
2004-06-01 22:23               ` Giuseppe Bilotta
2004-06-01 23:50                 ` Dmitry Torokhov
2004-06-02 15:08                   ` Giuseppe Bilotta
2004-06-01 21:01         ` keyboard problem with 2.6.6 jsimmons
2004-06-01 21:12           ` Valdis.Kletnieks
2004-05-30 13:54       ` Eduard Bloch
2004-05-30 14:03         ` Vojtech Pavlik
2004-06-01 21:03           ` jsimmons
2004-06-04 14:11     ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2004-06-02 15:31 SERIO_USERDEV patch for 2.6 Dmitry Torokhov
2004-06-03 13:11 ` Giuseppe Bilotta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200405301009.21202.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=danlee@informatik.uni-freiburg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tuukkat@ee.oulu.fi \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.