Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: sentelic - fix retrieving number of buttons

Fixing wrong register offset which is used to retrieve the number of buttons
attached to the hardware.

Signed-off-by: Tai-hwa Liang <avatar@sentelic.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

authored by

Tai-hwa Liang and committed by
Dmitry Torokhov
6ccbcf2c d9bae67a

+4 -3
+2 -2
drivers/input/mouse/sentelic.c
··· 2 2 * Finger Sensing Pad PS/2 mouse driver. 3 3 * 4 4 * Copyright (C) 2005-2007 Asia Vital Components Co., Ltd. 5 - * Copyright (C) 2005-2010 Tai-hwa Liang, Sentelic Corporation. 5 + * Copyright (C) 2005-2011 Tai-hwa Liang, Sentelic Corporation. 6 6 * 7 7 * This program is free software; you can redistribute it and/or 8 8 * modify it under the terms of the GNU General Public License ··· 309 309 }; 310 310 int val; 311 311 312 - if (fsp_reg_read(psmouse, FSP_REG_TMOD_STATUS1, &val) == -1) 312 + if (fsp_reg_read(psmouse, FSP_REG_TMOD_STATUS, &val) == -1) 313 313 return -EIO; 314 314 315 315 *btn = buttons[(val & 0x30) >> 4];
+2 -1
drivers/input/mouse/sentelic.h
··· 2 2 * Finger Sensing Pad PS/2 mouse driver. 3 3 * 4 4 * Copyright (C) 2005-2007 Asia Vital Components Co., Ltd. 5 - * Copyright (C) 2005-2009 Tai-hwa Liang, Sentelic Corporation. 5 + * Copyright (C) 2005-2011 Tai-hwa Liang, Sentelic Corporation. 6 6 * 7 7 * This program is free software; you can redistribute it and/or 8 8 * modify it under the terms of the GNU General Public License ··· 33 33 /* Finger-sensing Pad control registers */ 34 34 #define FSP_REG_SYSCTL1 0x10 35 35 #define FSP_BIT_EN_REG_CLK BIT(5) 36 + #define FSP_REG_TMOD_STATUS 0x20 36 37 #define FSP_REG_OPC_QDOWN 0x31 37 38 #define FSP_BIT_EN_OPC_TAG BIT(7) 38 39 #define FSP_REG_OPTZ_XLO 0x34