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
This commit is contained in:
Коммит
27efd7e2e6
|
@ -175,6 +175,10 @@ static void __init rx51_add_gpio_keys(void)
|
|||
#endif /* CONFIG_KEYBOARD_GPIO || CONFIG_KEYBOARD_GPIO_MODULE */
|
||||
|
||||
static int board_keymap[] = {
|
||||
/*
|
||||
* Note that KEY(x, 8, KEY_XXX) entries represent "entrire row
|
||||
* connected to the ground" matrix state.
|
||||
*/
|
||||
KEY(0, 0, KEY_Q),
|
||||
KEY(0, 1, KEY_O),
|
||||
KEY(0, 2, KEY_P),
|
||||
|
@ -182,6 +186,7 @@ static int board_keymap[] = {
|
|||
KEY(0, 4, KEY_BACKSPACE),
|
||||
KEY(0, 6, KEY_A),
|
||||
KEY(0, 7, KEY_S),
|
||||
|
||||
KEY(1, 0, KEY_W),
|
||||
KEY(1, 1, KEY_D),
|
||||
KEY(1, 2, KEY_F),
|
||||
|
@ -190,6 +195,7 @@ static int board_keymap[] = {
|
|||
KEY(1, 5, KEY_J),
|
||||
KEY(1, 6, KEY_K),
|
||||
KEY(1, 7, KEY_L),
|
||||
|
||||
KEY(2, 0, KEY_E),
|
||||
KEY(2, 1, KEY_DOT),
|
||||
KEY(2, 2, KEY_UP),
|
||||
|
@ -197,6 +203,8 @@ static int board_keymap[] = {
|
|||
KEY(2, 5, KEY_Z),
|
||||
KEY(2, 6, KEY_X),
|
||||
KEY(2, 7, KEY_C),
|
||||
KEY(2, 8, KEY_F9),
|
||||
|
||||
KEY(3, 0, KEY_R),
|
||||
KEY(3, 1, KEY_V),
|
||||
KEY(3, 2, KEY_B),
|
||||
|
@ -205,20 +213,23 @@ static int board_keymap[] = {
|
|||
KEY(3, 5, KEY_SPACE),
|
||||
KEY(3, 6, KEY_SPACE),
|
||||
KEY(3, 7, KEY_LEFT),
|
||||
|
||||
KEY(4, 0, KEY_T),
|
||||
KEY(4, 1, KEY_DOWN),
|
||||
KEY(4, 2, KEY_RIGHT),
|
||||
KEY(4, 4, KEY_LEFTCTRL),
|
||||
KEY(4, 5, KEY_RIGHTALT),
|
||||
KEY(4, 6, KEY_LEFTSHIFT),
|
||||
KEY(4, 8, KEY_10),
|
||||
|
||||
KEY(5, 0, KEY_Y),
|
||||
KEY(5, 8, KEY_11),
|
||||
|
||||
KEY(6, 0, KEY_U),
|
||||
|
||||
KEY(7, 0, KEY_I),
|
||||
KEY(7, 1, KEY_F7),
|
||||
KEY(7, 2, KEY_F8),
|
||||
KEY(0xff, 2, KEY_F9),
|
||||
KEY(0xff, 4, KEY_F10),
|
||||
KEY(0xff, 5, KEY_F11),
|
||||
};
|
||||
|
||||
static struct matrix_keymap_data board_map_data = {
|
||||
|
|
|
@ -89,7 +89,6 @@ struct gc_pad {
|
|||
struct gc {
|
||||
struct pardevice *pd;
|
||||
struct gc_pad pads[GC_MAX_DEVICES];
|
||||
struct input_dev *dev[GC_MAX_DEVICES];
|
||||
struct timer_list timer;
|
||||
int pad_count[GC_MAX];
|
||||
int used;
|
||||
|
@ -387,7 +386,7 @@ static void gc_nes_process_packet(struct gc *gc)
|
|||
for (i = 0; i < GC_MAX_DEVICES; i++) {
|
||||
|
||||
pad = &gc->pads[i];
|
||||
dev = gc->dev[i];
|
||||
dev = pad->dev;
|
||||
s = gc_status_bit[i];
|
||||
|
||||
switch (pad->type) {
|
||||
|
@ -579,7 +578,7 @@ static void gc_psx_command(struct gc *gc, int b, unsigned char *data)
|
|||
read = parport_read_status(port) ^ 0x80;
|
||||
|
||||
for (j = 0; j < GC_MAX_DEVICES; j++) {
|
||||
struct gc_pad *pad = &gc->pads[i];
|
||||
struct gc_pad *pad = &gc->pads[j];
|
||||
|
||||
if (pad->type == GC_PSX || pad->type == GC_DDR)
|
||||
data[j] |= (read & gc_status_bit[j]) ? (1 << i) : 0;
|
||||
|
|
|
@ -124,7 +124,7 @@ config KEYBOARD_ATKBD_RDI_KEYCODES
|
|||
right-hand column will be interpreted as the key shown in the
|
||||
left-hand column.
|
||||
|
||||
config QT2160
|
||||
config KEYBOARD_QT2160
|
||||
tristate "Atmel AT42QT2160 Touch Sensor Chip"
|
||||
depends on I2C && EXPERIMENTAL
|
||||
help
|
||||
|
|
|
@ -51,8 +51,12 @@
|
|||
*/
|
||||
#define TWL4030_MAX_ROWS 8 /* TWL4030 hard limit */
|
||||
#define TWL4030_MAX_COLS 8
|
||||
#define TWL4030_ROW_SHIFT 3
|
||||
#define TWL4030_KEYMAP_SIZE (TWL4030_MAX_ROWS * TWL4030_MAX_COLS)
|
||||
/*
|
||||
* Note that we add space for an extra column so that we can handle
|
||||
* row lines connected to the gnd (see twl4030_col_xlate()).
|
||||
*/
|
||||
#define TWL4030_ROW_SHIFT 4
|
||||
#define TWL4030_KEYMAP_SIZE (TWL4030_MAX_ROWS << TWL4030_ROW_SHIFT)
|
||||
|
||||
struct twl4030_keypad {
|
||||
unsigned short keymap[TWL4030_KEYMAP_SIZE];
|
||||
|
@ -182,7 +186,7 @@ static int twl4030_read_kp_matrix_state(struct twl4030_keypad *kp, u16 *state)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state)
|
||||
static bool twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state)
|
||||
{
|
||||
int i;
|
||||
u16 check = 0;
|
||||
|
@ -191,12 +195,12 @@ static int twl4030_is_in_ghost_state(struct twl4030_keypad *kp, u16 *key_state)
|
|||
u16 col = key_state[i];
|
||||
|
||||
if ((col & check) && hweight16(col) > 1)
|
||||
return 1;
|
||||
return true;
|
||||
|
||||
check |= col;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
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)
|
|||
if (!changed)
|
||||
continue;
|
||||
|
||||
for (col = 0; col < kp->n_cols; col++) {
|
||||
/* Extra column handles "all gnd" rows */
|
||||
for (col = 0; col < kp->n_cols + 1; col++) {
|
||||
int code;
|
||||
|
||||
if (!(changed & (1 << col)))
|
||||
|
|
|
@ -258,7 +258,7 @@ static struct platform_driver w90p910_keypad_driver = {
|
|||
.probe = w90p910_keypad_probe,
|
||||
.remove = __devexit_p(w90p910_keypad_remove),
|
||||
.driver = {
|
||||
.name = "nuc900-keypad",
|
||||
.name = "nuc900-kpi",
|
||||
.owner = THIS_MODULE,
|
||||
},
|
||||
};
|
||||
|
|
|
@ -141,8 +141,13 @@ static int synaptics_capability(struct psmouse *psmouse)
|
|||
priv->capabilities = (cap[0] << 16) | (cap[1] << 8) | cap[2];
|
||||
priv->ext_cap = priv->ext_cap_0c = 0;
|
||||
|
||||
if (!SYN_CAP_VALID(priv->capabilities))
|
||||
/*
|
||||
* Older firmwares had submodel ID fixed to 0x47
|
||||
*/
|
||||
if (SYN_ID_FULL(priv->identity) < 0x705 &&
|
||||
SYN_CAP_SUBMODEL_ID(priv->capabilities) != 0x47) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Unless capExtended is set the rest of the flags should be ignored
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#define SYN_CAP_FOUR_BUTTON(c) ((c) & (1 << 3))
|
||||
#define SYN_CAP_MULTIFINGER(c) ((c) & (1 << 1))
|
||||
#define SYN_CAP_PALMDETECT(c) ((c) & (1 << 0))
|
||||
#define SYN_CAP_VALID(c) ((((c) & 0x00ff00) >> 8) == 0x47)
|
||||
#define SYN_CAP_SUBMODEL_ID(c) (((c) & 0x00ff00) >> 8)
|
||||
#define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20)
|
||||
#define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12)
|
||||
#define SYN_CAP_PRODUCT_ID(ec) (((ec) & 0xff0000) >> 16)
|
||||
|
@ -66,6 +66,7 @@
|
|||
#define SYN_ID_MODEL(i) (((i) >> 4) & 0x0f)
|
||||
#define SYN_ID_MAJOR(i) ((i) & 0x0f)
|
||||
#define SYN_ID_MINOR(i) (((i) >> 16) & 0xff)
|
||||
#define SYN_ID_FULL(i) ((SYN_ID_MAJOR(i) << 8) | SYN_ID_MINOR(i))
|
||||
#define SYN_ID_IS_SYNAPTICS(i) ((((i) >> 8) & 0xff) == 0x47)
|
||||
|
||||
/* synaptics special commands */
|
||||
|
|
|
@ -169,6 +169,13 @@ static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = {
|
|||
DMI_MATCH(DMI_BOARD_VERSION, "1.02"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Gigabyte Spring Peak - defines wrong chassis type */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Spring Peak"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
||||
|
|
Загрузка…
Ссылка в новой задаче