Commit 945ef0d4 authored by Dmitry Torokhov's avatar Dmitry Torokhov

Input: i8042 - add i8042.nokbd module option to allow supressing

       creation of keyboard port.
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent c3d31e7f
...@@ -549,6 +549,7 @@ running once the system is up. ...@@ -549,6 +549,7 @@ running once the system is up.
keyboard and can not control its state keyboard and can not control its state
(Don't attempt to blink the leds) (Don't attempt to blink the leds)
i8042.noaux [HW] Don't check for auxiliary (== mouse) port i8042.noaux [HW] Don't check for auxiliary (== mouse) port
i8042.nokbd [HW] Don't check/create keyboard port
i8042.nomux [HW] Don't check presence of an active multiplexing i8042.nomux [HW] Don't check presence of an active multiplexing
controller controller
i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX i8042.nopnp [HW] Don't use ACPIPnP / PnPBIOS to discover KBD/AUX
......
...@@ -297,6 +297,8 @@ static int __init i8042_pnp_init(void) ...@@ -297,6 +297,8 @@ static int __init i8042_pnp_init(void)
aux_irq_str); aux_irq_str);
#if defined(__ia64__) #if defined(__ia64__)
if (result_kbd <= 0)
i8042_nokbd = 1;
if (result_aux <= 0) if (result_aux <= 0)
i8042_noaux = 1; i8042_noaux = 1;
#endif #endif
...@@ -315,7 +317,7 @@ static int __init i8042_pnp_init(void) ...@@ -315,7 +317,7 @@ static int __init i8042_pnp_init(void)
i8042_pnp_command_reg = i8042_command_reg; i8042_pnp_command_reg = i8042_command_reg;
} }
if (!i8042_pnp_kbd_irq) { if (!i8042_nokbd && !i8042_pnp_kbd_irq) {
printk(KERN_WARNING "PNP: PS/2 controller doesn't have KBD irq; using default %d\n", i8042_kbd_irq); printk(KERN_WARNING "PNP: PS/2 controller doesn't have KBD irq; using default %d\n", i8042_kbd_irq);
i8042_pnp_kbd_irq = i8042_kbd_irq; i8042_pnp_kbd_irq = i8042_kbd_irq;
} }
......
...@@ -27,6 +27,10 @@ MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>"); ...@@ -27,6 +27,10 @@ MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
MODULE_DESCRIPTION("i8042 keyboard and mouse controller driver"); MODULE_DESCRIPTION("i8042 keyboard and mouse controller driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
static unsigned int i8042_nokbd;
module_param_named(nokbd, i8042_nokbd, bool, 0);
MODULE_PARM_DESC(nokbd, "Do not probe or use KBD port.");
static unsigned int i8042_noaux; static unsigned int i8042_noaux;
module_param_named(noaux, i8042_noaux, bool, 0); module_param_named(noaux, i8042_noaux, bool, 0);
MODULE_PARM_DESC(noaux, "Do not probe or use AUX (mouse) port."); MODULE_PARM_DESC(noaux, "Do not probe or use AUX (mouse) port.");
...@@ -1058,7 +1062,7 @@ static int __init i8042_create_mux_port(int index) ...@@ -1058,7 +1062,7 @@ static int __init i8042_create_mux_port(int index)
static int __init i8042_init(void) static int __init i8042_init(void)
{ {
int i; int i, have_ports = 0;
int err; int err;
dbg_init(); dbg_init();
...@@ -1100,11 +1104,20 @@ static int __init i8042_init(void) ...@@ -1100,11 +1104,20 @@ static int __init i8042_init(void)
if (err) if (err)
goto err_unregister_ports; goto err_unregister_ports;
} }
have_ports = 1;
} }
err = i8042_create_kbd_port(); if (!i8042_nokbd) {
if (err) err = i8042_create_kbd_port();
goto err_unregister_ports; if (err)
goto err_unregister_ports;
have_ports = 1;
}
if (!have_ports) {
err = -ENODEV;
goto err_unregister_device;
}
mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD); mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
...@@ -1114,6 +1127,7 @@ static int __init i8042_init(void) ...@@ -1114,6 +1127,7 @@ static int __init i8042_init(void)
for (i = 0; i < I8042_NUM_PORTS; i++) for (i = 0; i < I8042_NUM_PORTS; i++)
if (i8042_ports[i].serio) if (i8042_ports[i].serio)
serio_unregister_port(i8042_ports[i].serio); serio_unregister_port(i8042_ports[i].serio);
err_unregister_device:
platform_device_unregister(i8042_platform_device); platform_device_unregister(i8042_platform_device);
err_unregister_driver: err_unregister_driver:
driver_unregister(&i8042_driver); driver_unregister(&i8042_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment