diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-20 13:33:06 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-20 13:33:06 -0400 |
| commit | a0fe3cc5d36a5f5b4f60abfe1a4b1caf4a5cce5a (patch) | |
| tree | 99a735d89df5bf49cf4edda1ba53bd9175d0f163 | |
| parent | 04afb40593f9a3007e5ea817d009529ef10fb685 (diff) | |
| parent | a62f0d27b4196bad5e900d766b285feb7069cd16 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (40 commits)
Input: psmouse - small formatting changes to better follow coding style
Input: synaptics - set dimensions as reported by firmware
Input: elantech - relax signature checks
Input: elantech - enforce common prefix on messages
Input: wistron_btns - switch to using kmemdup()
Input: usbtouchscreen - switch to using kmemdup()
Input: do not force selecting i8042 on Moorestown
Input: Documentation/sysrq.txt - update KEY_SYSRQ info
Input: 88pm860x_onkey - remove invalid irq number assignment
Input: i8042 - add a PNP entry to the aux device list
Input: i8042 - add some extra PNP keyboard types
Input: wm9712 - fix wm97xx_set_gpio() logic
Input: add keypad driver for keys interfaced to TCA6416
Input: remove obsolete {corgi,spitz,tosa}kbd.c
Input: kbtab - do not advertise unsupported events
Input: kbtab - simplify kbtab_disconnect()
Input: kbtab - fix incorrect size parameter in usb_buffer_free
Input: acecad - don't advertise mouse events
Input: acecad - fix some formatting issues
Input: acecad - simplify usb_acecad_disconnect()
...
Trivial conflict in Documentation/feature-removal-schedule.txt
42 files changed, 3995 insertions, 1233 deletions
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt index d56a01775423..5c17196c8fe9 100644 --- a/Documentation/sysrq.txt +++ b/Documentation/sysrq.txt | |||
| @@ -177,13 +177,13 @@ virtual console (ALT+Fn) and then back again should also help. | |||
| 177 | 177 | ||
| 178 | * I hit SysRq, but nothing seems to happen, what's wrong? | 178 | * I hit SysRq, but nothing seems to happen, what's wrong? |
| 179 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 179 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 180 | There are some keyboards that send different scancodes for SysRq than the | 180 | There are some keyboards that produce a different keycode for SysRq than the |
| 181 | pre-defined 0x54. So if SysRq doesn't work out of the box for a certain | 181 | pre-defined value of 99 (see KEY_SYSRQ in include/linux/input.h), or which |
| 182 | keyboard, run 'showkey -s' to find out the proper scancode sequence. Then | 182 | don't have a SysRq key at all. In these cases, run 'showkey -s' to find an |
| 183 | use 'setkeycodes <sequence> 84' to define this sequence to the usual SysRq | 183 | appropriate scancode sequence, and use 'setkeycodes <sequence> 99' to map |
| 184 | code (84 is decimal for 0x54). It's probably best to put this command in a | 184 | this sequence to the usual SysRq code (e.g., 'setkeycodes e05b 99'). It's |
| 185 | boot script. Oh, and by the way, you exit 'showkey' by not typing anything | 185 | probably best to put this command in a boot script. Oh, and by the way, you |
| 186 | for ten seconds. | 186 | exit 'showkey' by not typing anything for ten seconds. |
| 187 | 187 | ||
| 188 | * I want to add SysRQ key events to a module, how does it work? | 188 | * I want to add SysRQ key events to a module, how does it work? |
| 189 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 189 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index ada25bb8941e..54109dc9240c 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c | |||
| @@ -24,6 +24,8 @@ | |||
| 24 | * 21-08-02: Converted to input API, major cleanup. (Vojtech Pavlik) | 24 | * 21-08-02: Converted to input API, major cleanup. (Vojtech Pavlik) |
| 25 | */ | 25 | */ |
| 26 | 26 | ||
| 27 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 28 | |||
| 27 | #include <linux/consolemap.h> | 29 | #include <linux/consolemap.h> |
| 28 | #include <linux/module.h> | 30 | #include <linux/module.h> |
| 29 | #include <linux/sched.h> | 31 | #include <linux/sched.h> |
| @@ -38,7 +40,6 @@ | |||
| 38 | #include <linux/kbd_kern.h> | 40 | #include <linux/kbd_kern.h> |
| 39 | #include <linux/kbd_diacr.h> | 41 | #include <linux/kbd_diacr.h> |
| 40 | #include <linux/vt_kern.h> | 42 | #include <linux/vt_kern.h> |
| 41 | #include <linux/sysrq.h> | ||
| 42 | #include <linux/input.h> | 43 | #include <linux/input.h> |
| 43 | #include <linux/reboot.h> | 44 | #include <linux/reboot.h> |
| 44 | #include <linux/notifier.h> | 45 | #include <linux/notifier.h> |
| @@ -82,8 +83,7 @@ void compute_shiftstate(void); | |||
| 82 | typedef void (k_handler_fn)(struct vc_data *vc, unsigned char value, | 83 | typedef void (k_handler_fn)(struct vc_data *vc, unsigned char value, |
| 83 | char up_flag); | 84 | char up_flag); |
| 84 | static k_handler_fn K_HANDLERS; | 85 | static k_handler_fn K_HANDLERS; |
| 85 | k_handler_fn *k_handler[16] = { K_HANDLERS }; | 86 | static k_handler_fn *k_handler[16] = { K_HANDLERS }; |
| 86 | EXPORT_SYMBOL_GPL(k_handler); | ||
| 87 | 87 | ||
| 88 | #define FN_HANDLERS\ | 88 | #define FN_HANDLERS\ |
| 89 | fn_null, fn_enter, fn_show_ptregs, fn_show_mem,\ | 89 | fn_null, fn_enter, fn_show_ptregs, fn_show_mem,\ |
| @@ -133,7 +133,7 @@ static struct input_handler kbd_handler; | |||
| 133 | static DEFINE_SPINLOCK(kbd_event_lock); | 133 | static DEFINE_SPINLOCK(kbd_event_lock); |
| 134 | static unsigned long key_down[BITS_TO_LONGS(KEY_CNT)]; /* keyboard key bitmap */ | 134 | static unsigned long key_down[BITS_TO_LONGS(KEY_CNT)]; /* keyboard key bitmap */ |
| 135 | static unsigned char shift_down[NR_SHIFT]; /* shift state counters.. */ | 135 | static unsigned char shift_down[NR_SHIFT]; /* shift state counters.. */ |
| 136 | static int dead_key_next; | 136 | static bool dead_key_next; |
| 137 | static int npadch = -1; /* -1 or number assembled on pad */ | 137 | static int npadch = -1; /* -1 or number assembled on pad */ |
| 138 | static unsigned int diacr; | 138 | static unsigned int diacr; |
| 139 | static char rep; /* flag telling character repeat */ | 139 | static char rep; /* flag telling character repeat */ |
| @@ -147,22 +147,6 @@ static struct ledptr { | |||
| 147 | unsigned char valid:1; | 147 | unsigned char valid:1; |
| 148 | } ledptrs[3]; | 148 | } ledptrs[3]; |
| 149 | 149 | ||
| 150 | /* Simple translation table for the SysRq keys */ | ||
| 151 | |||
| 152 | #ifdef CONFIG_MAGIC_SYSRQ | ||
| 153 | unsigned char kbd_sysrq_xlate[KEY_MAX + 1] = | ||
| 154 | "\000\0331234567890-=\177\t" /* 0x00 - 0x0f */ | ||
| 155 | "qwertyuiop[]\r\000as" /* 0x10 - 0x1f */ | ||
| 156 | "dfghjkl;'`\000\\zxcv" /* 0x20 - 0x2f */ | ||
| 157 | "bnm,./\000*\000 \000\201\202\203\204\205" /* 0x30 - 0x3f */ | ||
| 158 | "\206\207\210\211\212\000\000789-456+1" /* 0x40 - 0x4f */ | ||
| 159 | "230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */ | ||
| 160 | "\r\000/"; /* 0x60 - 0x6f */ | ||
| 161 | static int sysrq_down; | ||
| 162 | static int sysrq_alt_use; | ||
| 163 | #endif | ||
| 164 | static int sysrq_alt; | ||
| 165 | |||
| 166 | /* | 150 | /* |
| 167 | * Notifier list for console keyboard events | 151 | * Notifier list for console keyboard events |
| 168 | */ | 152 | */ |
| @@ -361,8 +345,8 @@ static void to_utf8(struct vc_data *vc, uint c) | |||
| 361 | /* 110***** 10****** */ | 345 | /* 110***** 10****** */ |
| 362 | put_queue(vc, 0xc0 | (c >> 6)); | 346 | put_queue(vc, 0xc0 | (c >> 6)); |
| 363 | put_queue(vc, 0x80 | (c & 0x3f)); | 347 | put_queue(vc, 0x80 | (c & 0x3f)); |
| 364 | } else if (c < 0x10000) { | 348 | } else if (c < 0x10000) { |
| 365 | if (c >= 0xD800 && c < 0xE000) | 349 | if (c >= 0xD800 && c < 0xE000) |
| 366 | return; | 350 | return; |
| 367 | if (c == 0xFFFF) | 351 | if (c == 0xFFFF) |
| 368 | return; | 352 | return; |
| @@ -370,7 +354,7 @@ static void to_utf8(struct vc_data *vc, uint c) | |||
| 370 | put_queue(vc, 0xe0 | (c >> 12)); | 354 | put_queue(vc, 0xe0 | (c >> 12)); |
| 371 | put_queue(vc | ||
