diff options
Diffstat (limited to 'drivers/input/serio/i8042.c')
| -rw-r--r-- | drivers/input/serio/i8042.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 258b98b9d7c2..46e4ba0b9246 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c | |||
| @@ -61,10 +61,6 @@ static bool i8042_noloop; | |||
| 61 | module_param_named(noloop, i8042_noloop, bool, 0); | 61 | module_param_named(noloop, i8042_noloop, bool, 0); |
| 62 | MODULE_PARM_DESC(noloop, "Disable the AUX Loopback command while probing for the AUX port"); | 62 | MODULE_PARM_DESC(noloop, "Disable the AUX Loopback command while probing for the AUX port"); |
| 63 | 63 | ||
| 64 | static unsigned int i8042_blink_frequency = 500; | ||
| 65 | module_param_named(panicblink, i8042_blink_frequency, uint, 0600); | ||
| 66 | MODULE_PARM_DESC(panicblink, "Frequency with which keyboard LEDs should blink when kernel panics"); | ||
| 67 | |||
| 68 | #ifdef CONFIG_X86 | 64 | #ifdef CONFIG_X86 |
| 69 | static bool i8042_dritek; | 65 | static bool i8042_dritek; |
| 70 | module_param_named(dritek, i8042_dritek, bool, 0); | 66 | module_param_named(dritek, i8042_dritek, bool, 0); |
| @@ -1030,8 +1026,8 @@ static void i8042_controller_reset(void) | |||
| 1030 | 1026 | ||
| 1031 | 1027 | ||
| 1032 | /* | 1028 | /* |
| 1033 | * i8042_panic_blink() will flash the keyboard LEDs and is called when | 1029 | * i8042_panic_blink() will turn the keyboard LEDs on or off and is called |
| 1034 | * kernel panics. Flashing LEDs is useful for users running X who may | 1030 | * when kernel panics. Flashing LEDs is useful for users running X who may |
| 1035 | * not see the console and will help distingushing panics from "real" | 1031 | * not see the console and will help distingushing panics from "real" |
| 1036 | * lockups. | 1032 | * lockups. |
| 1037 | * | 1033 | * |
| @@ -1041,22 +1037,12 @@ static void i8042_controller_reset(void) | |||
| 1041 | 1037 | ||
| 1042 | #define DELAY do { mdelay(1); if (++delay > 10) return delay; } while(0) | 1038 | #define DELAY do { mdelay(1); if (++delay > 10) return delay; } while(0) |
| 1043 | 1039 | ||
| 1044 | static long i8042_panic_blink(long count) | 1040 | static long i8042_panic_blink(int state) |
| 1045 | { | 1041 | { |
| 1046 | long delay = 0; | 1042 | long delay = 0; |
| 1047 | static long last_blink; | 1043 | char led; |
| 1048 | static char led; | ||
| 1049 | |||
| 1050 | /* | ||
| 1051 | * We expect frequency to be about 1/2s. KDB uses about 1s. | ||
| 1052 | * Make sure they are different. | ||
| 1053 | */ | ||
| 1054 | if (!i8042_blink_frequency) | ||
| 1055 | return 0; | ||
| 1056 | if (count - last_blink < i8042_blink_frequency) | ||
| 1057 | return 0; | ||
| 1058 | 1044 | ||
| 1059 | led ^= 0x01 | 0x04; | 1045 | led = (state) ? 0x01 | 0x04 : 0; |
| 1060 | while (i8042_read_status() & I8042_STR_IBF) | 1046 | while (i8042_read_status() & I8042_STR_IBF) |
| 1061 | DELAY; | 1047 | DELAY; |
| 1062 | dbg("%02x -> i8042 (panic blink)", 0xed); | 1048 | dbg("%02x -> i8042 (panic blink)", 0xed); |
| @@ -1069,7 +1055,6 @@ static long i8042_panic_blink(long count) | |||
| 1069 | dbg("%02x -> i8042 (panic blink)", led); | 1055 | dbg("%02x -> i8042 (panic blink)", led); |
| 1070 | i8042_write_data(led); | 1056 | i8042_write_data(led); |
| 1071 | DELAY; | 1057 | DELAY; |
| 1072 | last_blink = count; | ||
| 1073 | return delay; | 1058 | return delay; |
| 1074 | } | 1059 | } |
| 1075 | 1060 | ||
