aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-spear
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-22 23:20:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-22 23:20:18 -0400
commit7bfe0e66d5da32961f0060fc5d96b739b1ed64b9 (patch)
tree6d5dcf77248b574bb0c50930bbf9030aafb99fce /arch/arm/plat-spear
parent6a76a6992341faab0ef31e7d97000e0cf336d0ba (diff)
parent10ce3cc919f50c2043b41ca968b43c26a3672600 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input subsystem updates from Dmitry Torokhov: "- we finally merged driver for USB version of Synaptics touchpads (I guess most commonly found in IBM/Lenovo keyboard/touchpad combo); - a bunch of new drivers for embedded platforms (Cypress touchscreens, DA9052 OnKey, MAX8997-haptic, Ilitek ILI210x touchscreens, TI touchscreen); - input core allows clients to specify desired clock source for timestamps on input events (EVIOCSCLOCKID ioctl); - input core allows querying state of all MT slots for given event code via EVIOCGMTSLOTS ioctl; - various driver fixes and improvements." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (45 commits) Input: ili210x - add support for Ilitek ILI210x based touchscreens Input: altera_ps2 - use of_match_ptr() Input: synaptics_usb - switch to module_usb_driver() Input: convert I2C drivers to use module_i2c_driver() Input: convert SPI drivers to use module_spi_driver() Input: omap4-keypad - move platform_data to <linux/platform_data> Input: kxtj9 - who_am_i check value and initial data rate fixes Input: add driver support for MAX8997-haptic Input: tegra-kbc - revise device tree support Input: of_keymap - add device tree bindings for simple key matrices Input: wacom - fix physical size calculation for 3rd-gen Bamboo Input: twl4030-vibra - really switch from #if to #ifdef Input: hp680_ts_input - ensure arguments to request_irq and free_irq are compatible Input: max8925_onkey - avoid accessing input device too early Input: max8925_onkey - allow to be used as a wakeup source Input: atmel-wm97xx - convert to dev_pm_ops Input: atmel-wm97xx - set driver owner Input: add cyttsp touchscreen maintainer entry Input: cyttsp - remove useless checks in cyttsp_probe() Input: usbtouchscreen - add support for Data Modul EasyTouch TP 72037 ...
Diffstat (limited to 'arch/arm/plat-spear')
-rw-r--r--arch/arm/plat-spear/include/plat/keyboard.h66
1 files changed, 47 insertions, 19 deletions
diff --git a/arch/arm/plat-spear/include/plat/keyboard.h b/arch/arm/plat-spear/include/plat/keyboard.h
index 68b5394fc58..c16cc31ecbe 100644
--- a/arch/arm/plat-spear/include/plat/keyboard.h
+++ b/arch/arm/plat-spear/include/plat/keyboard.h
@@ -15,7 +15,7 @@
15#include <linux/input/matrix_keypad.h> 15#include <linux/input/matrix_keypad.h>
16#include <linux/types.h> 16#include <linux/types.h>
17 17
18#define DECLARE_KEYMAP(_name) \ 18#define DECLARE_9x9_KEYMAP(_name) \
19int _name[] = { \ 19int _name[] = { \
20 KEY(0, 0, KEY_ESC), \ 20 KEY(0, 0, KEY_ESC), \
21 KEY(0, 1, KEY_1), \ 21 KEY(0, 1, KEY_1), \
@@ -62,24 +62,6 @@ int _name[] = { \
62 KEY(4, 6, KEY_Z), \ 62 KEY(4, 6, KEY_Z), \
63 KEY(4, 7, KEY_X), \ 63 KEY(4, 7, KEY_X), \
64 KEY(4, 8, KEY_C), \ 64 KEY(4, 8, KEY_C), \
65 KEY(4, 0, KEY_L), \
66 KEY(4, 1, KEY_SEMICOLON), \
67 KEY(4, 2, KEY_APOSTROPHE), \
68 KEY(4, 3, KEY_GRAVE), \
69 KEY(4, 4, KEY_LEFTSHIFT), \
70 KEY(4, 5, KEY_BACKSLASH), \
71 KEY(4, 6, KEY_Z), \
72 KEY(4, 7, KEY_X), \
73 KEY(4, 8, KEY_C), \
74 KEY(4, 0, KEY_L), \
75 KEY(4, 1, KEY_SEMICOLON), \
76 KEY(4, 2, KEY_APOSTROPHE), \
77 KEY(4, 3, KEY_GRAVE), \
78 KEY(4, 4, KEY_LEFTSHIFT), \
79 KEY(4, 5, KEY_BACKSLASH), \
80 KEY(4, 6, KEY_Z), \
81 KEY(4, 7, KEY_X), \
82 KEY(4, 8, KEY_C), \
83 KEY(5, 0, KEY_V), \ 65 KEY(5, 0, KEY_V), \
84 KEY(5, 1, KEY_B), \ 66 KEY(5, 1, KEY_B), \
85 KEY(5, 2, KEY_N), \ 67 KEY(5, 2, KEY_N), \
@@ -118,10 +100,55 @@ int _name[] = { \
118 KEY(8, 8, KEY_KP0), \ 100 KEY(8, 8, KEY_KP0), \
119} 101}
120 102
103#define DECLARE_6x6_KEYMAP(_name) \
104int _name[] = { \
105 KEY(0, 0, KEY_RESERVED), \
106 KEY(0, 1, KEY_1), \
107 KEY(0, 2, KEY_2), \
108 KEY(0, 3, KEY_3), \
109 KEY(0, 4, KEY_4), \
110 KEY(0, 5, KEY_5), \
111 KEY(1, 0, KEY_Q), \
112 KEY(1, 1, KEY_W), \
113 KEY(1, 2, KEY_E), \
114 KEY(1, 3, KEY_R), \
115 KEY(1, 4, KEY_T), \
116 KEY(1, 5, KEY_Y), \
117 KEY(2, 0, KEY_D), \
118 KEY(2, 1, KEY_F), \
119 KEY(2, 2, KEY_G), \
120 KEY(2, 3, KEY_H), \
121 KEY(2, 4, KEY_J), \
122 KEY(2, 5, KEY_K), \
123 KEY(3, 0, KEY_B), \
124 KEY(3, 1, KEY_N), \
125 KEY(3, 2, KEY_M), \
126 KEY(3, 3, KEY_COMMA), \
127 KEY(3, 4, KEY_DOT), \
128 KEY(3, 5, KEY_SLASH), \
129 KEY(4, 0, KEY_F6), \
130 KEY(4, 1, KEY_F7), \
131 KEY(4, 2, KEY_F8), \
132 KEY(4, 3, KEY_F9), \
133 KEY(4, 4, KEY_F10), \
134 KEY(4, 5, KEY_NUMLOCK), \
135 KEY(5, 0, KEY_KP2), \
136 KEY(5, 1, KEY_KP3), \
137 KEY(5, 2, KEY_KP0), \
138 KEY(5, 3, KEY_KPDOT), \
139 KEY(5, 4, KEY_RO), \
140 KEY(5, 5, KEY_ZENKAKUHANKAKU), \
141}
142
143#define KEYPAD_9x9 0
144#define KEYPAD_6x6 1
145#define KEYPAD_2x2 2
146
121/** 147/**
122 * struct kbd_platform_data - spear keyboard platform data 148 * struct kbd_platform_data - spear keyboard platform data
123 * keymap: pointer to keymap data (table and size) 149 * keymap: pointer to keymap data (table and size)
124 * rep: enables key autorepeat 150 * rep: enables key autorepeat
151 * mode: choose keyboard support(9x9, 6x6, 2x2)
125 * 152 *
126 * This structure is supposed to be used by platform code to supply 153 * This structure is supposed to be used by platform code to supply
127 * keymaps to drivers that implement keyboards. 154 * keymaps to drivers that implement keyboards.
@@ -129,6 +156,7 @@ int _name[] = { \
129struct kbd_platform_data { 156struct kbd_platform_data {
130 const struct matrix_keymap_data *keymap; 157 const struct matrix_keymap_data *keymap;
131 bool rep; 158 bool rep;
159 unsigned int mode;
132}; 160};
133 161
134/* This function is used to set platform data field of pdev->dev */ 162/* This function is used to set platform data field of pdev->dev */