Messages in this thread Patch in this message | | | From | Dmitry Torokhov <> | Subject | Re: SERIO_USERDEV patch for 2.6 | Date | Sun, 30 May 2004 10:09:18 -0500 |
| |
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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |