Skip to content

Commit 27efd7e

Browse files
committed
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: Input: synaptics - relax capability ID checks on newer hardware Input: twl40300-keypad - fix handling of "all ground" rows Input: gamecon - reference correct pad in gc_psx_command() Input: gamecon - reference correct input device in NES mode Input: w90p910_keypad - change platfrom driver name to 'nuc900-kpi' Input: i8042 - add Gigabyte Spring Peak to dmi_noloop_table Input: qt2160 - rename kconfig symbol name
2 parents 84d4db0 + 3619b8f commit 27efd7e

File tree

8 files changed

+44
-16
lines changed

8 files changed

+44
-16
lines changed

arch/arm/mach-omap2/board-rx51-peripherals.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,13 +175,18 @@ static void __init rx51_add_gpio_keys(void)
175175
#endif /* CONFIG_KEYBOARD_GPIO || CONFIG_KEYBOARD_GPIO_MODULE */
176176

177177
static int board_keymap[] = {
178+
/*
179+
* Note that KEY(x, 8, KEY_XXX) entries represent "entrire row
180+
* connected to the ground" matrix state.
181+
*/
178182
KEY(0, 0, KEY_Q),
179183
KEY(0, 1, KEY_O),
180184
KEY(0, 2, KEY_P),
181185
KEY(0, 3, KEY_COMMA),
182186
KEY(0, 4, KEY_BACKSPACE),
183187
KEY(0, 6, KEY_A),
184188
KEY(0, 7, KEY_S),
189+
185190
KEY(1, 0, KEY_W),
186191
KEY(1, 1, KEY_D),
187192
KEY(1, 2, KEY_F),
@@ -190,13 +195,16 @@ static int board_keymap[] = {
190195
KEY(1, 5, KEY_J),
191196
KEY(1, 6, KEY_K),
192197
KEY(1, 7, KEY_L),
198+
193199
KEY(2, 0, KEY_E),
194200
KEY(2, 1, KEY_DOT),
195201
KEY(2, 2, KEY_UP),
196202
KEY(2, 3, KEY_ENTER),
197203
KEY(2, 5, KEY_Z),
198204
KEY(2, 6, KEY_X),
199205
KEY(2, 7, KEY_C),
206+
KEY(2, 8, KEY_F9),
207+
200208
KEY(3, 0, KEY_R),
201209
KEY(3, 1, KEY_V),
202210
KEY(3, 2, KEY_B),
@@ -205,20 +213,23 @@ static int board_keymap[] = {
205213
KEY(3, 5, KEY_SPACE),
206214
KEY(3, 6, KEY_SPACE),
207215
KEY(3, 7, KEY_LEFT),
216+
208217
KEY(4, 0, KEY_T),
209218
KEY(4, 1, KEY_DOWN),
210219
KEY(4, 2, KEY_RIGHT),
211220
KEY(4, 4, KEY_LEFTCTRL),
212221
KEY(4, 5, KEY_RIGHTALT),
213222
KEY(4, 6, KEY_LEFTSHIFT),
223+
KEY(4, 8, KEY_10),
224+
214225
KEY(5, 0, KEY_Y),
226+
KEY(5, 8, KEY_11),
227+
215228
KEY(6, 0, KEY_U),
229+
216230
KEY(7, 0, KEY_I),
217231
KEY(7, 1, KEY_F7),
218232
KEY(7, 2, KEY_F8),
219-
KEY(0xff, 2, KEY_F9),
220-
KEY(0xff, 4, KEY_F10),
221-
KEY(0xff, 5, KEY_F11),
222233
};
223234

224235
static struct matrix_keymap_data board_map_data = {

drivers/input/joystick/gamecon.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ struct gc_pad {
8989
struct gc {
9090
struct pardevice *pd;
9191
struct gc_pad pads[GC_MAX_DEVICES];
92-
struct input_dev *dev[GC_MAX_DEVICES];
9392
struct timer_list timer;
9493
int pad_count[GC_MAX];
9594
int used;
@@ -387,7 +386,7 @@ static void gc_nes_process_packet(struct gc *gc)
387386
for (i = 0; i < GC_MAX_DEVICES; i++) {
388387

389388
pad = &gc->pads[i];
390-
dev = gc->dev[i];
389+
dev = pad->dev;
391390
s = gc_status_bit[i];
392391

393392
switch (pad->type) {
@@ -579,7 +578,7 @@ static void gc_psx_command(struct gc *gc, int b, unsigned char *data)
579578
read = parport_read_status(port) ^ 0x80;
580579

581580
for (j = 0; j < GC_MAX_DEVICES; j++) {
582-
struct gc_pad *pad = &gc->pads[i];
581+
struct gc_pad *pad = &gc->pads[j];
583582

584583
if (pad->type == GC_PSX || pad->type == GC_DDR)
585584
data[j] |= (read & gc_status_bit[j]) ? (1 << i) : 0;

drivers/input/keyboard/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ config KEYBOARD_ATKBD_RDI_KEYCODES
124124
right-hand column will be interpreted as the key shown in the
125125
left-hand column.
126126

127-
config QT2160
127+
config KEYBOARD_QT2160
128128
tristate "Atmel AT42QT2160 Touch Sensor Chip"
129129
depends on I2C && EXPERIMENTAL
130130
help

drivers/input/keyboard/twl4030_keypad.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,12 @@
5151
*/
5252
#define TWL4030_MAX_ROWS 8 /* TWL4030 hard limit */
5353
#define TWL4030_MAX_COLS 8
54-
#define TWL4030_ROW_SHIFT 3
55-
#define TWL4030_KEYMAP_SIZE (TWL4030_MAX_ROWS * TWL4030_MAX_COLS)
54+
/*
55+
* Note that we add space for an extra column so that we can handle
56+
* row lines connected to the gnd (see twl4030_col_xlate()).
57+
*/
58+
#define TWL4030_ROW_SHIFT 4
59+
#define TWL4030_KEYMAP_SIZE (TWL4030_MAX_ROWS << TWL4030_ROW_SHIFT)
5660

5761
struct twl4030_keypad {
5862
unsigned short keymap[TWL4030_KEYMAP_SIZE];
@@ -182,7 +186,7 @@ static int twl4030_read_kp_matrix_state(struct twl4030_keypad *kp, u16 *state)
182186
return ret;
183187
}
184188

185-
static int twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state)
189+
static bool twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state)
186190
{
187191
int i;
188192
u16 check = 0;
@@ -191,12 +195,12 @@ static int twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state)
191195
u16 col = key_state[i];
192196

193197
if ((col & check) && hweight16(col) > 1)
194-
return 1;
198+
return true;
195199

196200
check |= col;
197201
}
198202

199-
return 0;
203+
return false;
200204
}
201205

202206
static void twl4030_kp_scan(struct twl4030_keypad *kp, bool release_all)
@@ -225,7 +229,8 @@ static void twl4030_kp_scan(struct twl4030_keypad *kp, bool release_all)
225229
if (!changed)
226230
continue;
227231

228-
for (col = 0; col < kp->n_cols; col++) {
232+
/* Extra column handles "all gnd" rows */
233+
for (col = 0; col < kp->n_cols + 1; col++) {
229234
int code;
230235

231236
if (!(changed & (1 << col)))

drivers/input/keyboard/w90p910_keypad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ static struct platform_driver w90p910_keypad_driver = {
258258
.probe = w90p910_keypad_probe,
259259
.remove = __devexit_p(w90p910_keypad_remove),
260260
.driver = {
261-
.name = "nuc900-keypad",
261+
.name = "nuc900-kpi",
262262
.owner = THIS_MODULE,
263263
},
264264
};

drivers/input/mouse/synaptics.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,13 @@ static int synaptics_capability(struct psmouse *psmouse)
141141
priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2];
142142
priv->ext_cap = priv->ext_cap_0c = 0;
143143

144-
if (!SYN_CAP_VALID(priv->capabilities))
144+
/*
145+
* Older firmwares had submodel ID fixed to 0x47
146+
*/
147+
if (SYN_ID_FULL(priv->identity) < 0x705 &&
148+
SYN_CAP_SUBMODEL_ID(priv->capabilities) != 0x47) {
145149
return -1;
150+
}
146151

147152
/*
148153
* Unless capExtended is set the rest of the flags should be ignored

drivers/input/mouse/synaptics.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#define SYN_CAP_FOUR_BUTTON(c) ((c) & (1 << 3))
4848
#define SYN_CAP_MULTIFINGER(c) ((c) & (1 << 1))
4949
#define SYN_CAP_PALMDETECT(c) ((c) & (1 << 0))
50-
#define SYN_CAP_VALID(c) ((((c) & 0x00ff00) >> 8) == 0x47)
50+
#define SYN_CAP_SUBMODEL_ID(c) (((c) & 0x00ff00) >> 8)
5151
#define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20)
5252
#define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12)
5353
#define SYN_CAP_PRODUCT_ID(ec) (((ec) & 0xff0000) >> 16)
@@ -66,6 +66,7 @@
6666
#define SYN_ID_MODEL(i) (((i) >> 4) & 0x0f)
6767
#define SYN_ID_MAJOR(i) ((i) & 0x0f)
6868
#define SYN_ID_MINOR(i) (((i) >> 16) & 0xff)
69+
#define SYN_ID_FULL(i) ((SYN_ID_MAJOR(i) << 8) | SYN_ID_MINOR(i))
6970
#define SYN_ID_IS_SYNAPTICS(i) ((((i) >> 8) & 0xff) == 0x47)
7071

7172
/* synaptics special commands */

drivers/input/serio/i8042-x86ia64io.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,13 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = {
169169
DMI_MATCH(DMI_BOARD_VERSION, "1.02"),
170170
},
171171
},
172+
{
173+
/* Gigabyte Spring Peak - defines wrong chassis type */
174+
.matches = {
175+
DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
176+
DMI_MATCH(DMI_PRODUCT_NAME, "Spring Peak"),
177+
},
178+
},
172179
{
173180
.matches = {
174181
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),

0 commit comments

Comments
 (0)