2011-05-19 08:34:42 -06:00
|
|
|
/*
|
|
|
|
* drivers/input/keyboard/tegra-nvec.c
|
|
|
|
*
|
|
|
|
* Keyboard class input driver for keyboards connected to an NvEc compliant
|
|
|
|
* embedded controller
|
|
|
|
*
|
|
|
|
* Copyright (c) 2009, NVIDIA Corporation.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
static unsigned short code_tab_102us[] = {
|
2011-09-27 11:00:40 -06:00
|
|
|
/* 0x00 */
|
|
|
|
KEY_GRAVE,
|
2011-05-19 08:34:42 -06:00
|
|
|
KEY_ESC,
|
|
|
|
KEY_1,
|
|
|
|
KEY_2,
|
|
|
|
KEY_3,
|
|
|
|
KEY_4,
|
|
|
|
KEY_5,
|
|
|
|
KEY_6,
|
|
|
|
KEY_7,
|
|
|
|
KEY_8,
|
|
|
|
KEY_9,
|
|
|
|
KEY_0,
|
|
|
|
KEY_MINUS,
|
|
|
|
KEY_EQUAL,
|
|
|
|
KEY_BACKSPACE,
|
|
|
|
KEY_TAB,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* 0x10 */
|
|
|
|
KEY_Q,
|
2011-05-19 08:34:42 -06:00
|
|
|
KEY_W,
|
|
|
|
KEY_E,
|
|
|
|
KEY_R,
|
|
|
|
KEY_T,
|
|
|
|
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SCROLL */
|
|
|
|
0,
|
2011-05-19 08:34:42 -06:00
|
|
|
KEY_KP7,
|
|
|
|
KEY_KP8,
|
|
|
|
KEY_KP9,
|
|
|
|
KEY_KPMINUS,
|
|
|
|
KEY_KP4,
|
|
|
|
KEY_KP5,
|
|
|
|
KEY_KP6,
|
|
|
|
KEY_KPPLUS,
|
|
|
|
KEY_KP1,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* 0x50 */
|
|
|
|
KEY_KP2,
|
2011-05-19 08:34:42 -06:00
|
|
|
KEY_KP3,
|
|
|
|
KEY_KP0,
|
|
|
|
KEY_KPDOT,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* VK_SNAPSHOT */
|
|
|
|
KEY_MENU,
|
2011-05-19 08:34:42 -06:00
|
|
|
KEY_POWER,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* VK_OEM_102 */
|
|
|
|
KEY_102ND,
|
|
|
|
KEY_F11,
|
|
|
|
KEY_F12,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
/* 0x60 */
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
KEY_SEARCH,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
/* 0x70 */
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
KEY_KP5,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
KEY_KP9,
|
2011-05-19 08:34:42 -06:00
|
|
|
};
|
|
|
|
|
|
|
|
static unsigned short extcode_tab_us102[] = {
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* 0x10 */
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
2011-05-19 08:34:42 -06:00
|
|
|
0,
|
|
|
|
0,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* VK_MEDIA_NEXT_TRACK */
|
2011-05-19 08:34:42 -06:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* VK_RETURN */
|
2011-05-19 08:34:42 -06:00
|
|
|
0,
|
2011-09-27 11:00:40 -06:00
|
|
|
KEY_RIGHTCTRL,
|
2011-05-19 08:34:42 -06:00
|
|
|
0,
|
|
|
|
0,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* 0x20 */
|
|
|
|
KEY_MUTE,
|
|
|
|
/* VK_LAUNCH_APP1 */
|
2011-05-19 08:34:42 -06:00
|
|
|
0,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* VK_MEDIA_PLAY_PAUSE */
|
2011-05-19 08:34:42 -06:00
|
|
|
0,
|
|
|
|
0,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* VK_MEDIA_STOP */
|
2011-05-19 08:34:42 -06:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* 0x30 */
|
|
|
|
KEY_VOLUMEUP,
|
2011-05-19 08:34:42 -06:00
|
|
|
0,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* VK_BROWSER_HOME */
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
/* VK_DIVIDE */
|
|
|
|
KEY_KPSLASH,
|
|
|
|
0,
|
|
|
|
/* VK_SNAPSHOT */
|
|
|
|
KEY_SYSRQ,
|
|
|
|
/* VK_RMENU */
|
|
|
|
KEY_RIGHTALT,
|
|
|
|
/* VK_OEM_NV_BACKLIGHT_UP */
|
|
|
|
0,
|
|
|
|
/* VK_OEM_NV_BACKLIGHT_DN */
|
|
|
|
0,
|
|
|
|
/* VK_OEM_NV_BACKLIGHT_AUTOTOGGLE */
|
|
|
|
0,
|
|
|
|
/* VK_OEM_NV_POWER_INFO */
|
|
|
|
0,
|
|
|
|
/* VK_OEM_NV_WIFI_TOGGLE */
|
|
|
|
0,
|
|
|
|
/* VK_OEM_NV_DISPLAY_SELECT */
|
|
|
|
0,
|
|
|
|
/* VK_OEM_NV_AIRPLANE_TOGGLE */
|
|
|
|
0,
|
|
|
|
/* 0x40 */
|
|
|
|
0,
|
|
|
|
KEY_LEFT,
|
2011-05-19 08:34:42 -06:00
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
KEY_CANCEL,
|
|
|
|
KEY_HOME,
|
|
|
|
KEY_UP,
|
2011-09-27 11:00:40 -06:00
|
|
|
KEY_PAGEUP,
|
2011-05-19 08:34:42 -06:00
|
|
|
0,
|
|
|
|
KEY_LEFT,
|
|
|
|
0,
|
|
|
|
KEY_RIGHT,
|
|
|
|
0,
|
|
|
|
KEY_END,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* 0x50 */
|
|
|
|
KEY_DOWN,
|
|
|
|
KEY_PAGEDOWN,
|
2011-05-19 08:34:42 -06:00
|
|
|
KEY_INSERT,
|
|
|
|
KEY_DELETE,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
2011-09-27 11:00:40 -06:00
|
|
|
KEY_LEFTMETA,
|
|
|
|
0,
|
|
|
|
KEY_ESC,
|
|
|
|
KEY_KPMINUS,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
/* VK_BROWSER_SEARCH */
|
|
|
|
0,
|
|
|
|
/* VK_BROWSER_FAVORITES */
|
|
|
|
0,
|
|
|
|
/* VK_BROWSER_REFRESH */
|
|
|
|
0,
|
|
|
|
/* VK_BROWSER_STOP */
|
|
|
|
0,
|
|
|
|
/* VK_BROWSER_FORWARD */
|
2011-05-19 08:34:42 -06:00
|
|
|
0,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* VK_BROWSER_BACK */
|
2011-05-19 08:34:42 -06:00
|
|
|
0,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* VK_LAUNCH_APP2 */
|
2011-05-19 08:34:42 -06:00
|
|
|
0,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* VK_LAUNCH_MAIL */
|
2011-05-19 08:34:42 -06:00
|
|
|
0,
|
2011-09-27 11:00:40 -06:00
|
|
|
/* VK_LAUNCH_MEDIA_SELECT */
|
2011-05-19 08:34:42 -06:00
|
|
|
0,
|
|
|
|
};
|
|
|
|
|
2011-09-27 11:00:40 -06:00
|
|
|
static unsigned short *code_tabs[] = { code_tab_102us, extcode_tab_us102 };
|