Skip to content

Commit 6ccbcf2

Browse files
Tai-hwa Liangdtor
authored andcommitted
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 <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent d9bae67 commit 6ccbcf2

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

drivers/input/mouse/sentelic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Finger Sensing Pad PS/2 mouse driver.
33
*
44
* 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.
66
*
77
* This program is free software; you can redistribute it and/or
88
* modify it under the terms of the GNU General Public License
@@ -309,7 +309,7 @@ static int fsp_get_buttons(struct psmouse *psmouse, int *btn)
309309
};
310310
int val;
311311

312-
if (fsp_reg_read(psmouse, FSP_REG_TMOD_STATUS1, &val) == -1)
312+
if (fsp_reg_read(psmouse, FSP_REG_TMOD_STATUS, &val) == -1)
313313
return -EIO;
314314

315315
*btn = buttons[(val & 0x30) >> 4];

drivers/input/mouse/sentelic.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Finger Sensing Pad PS/2 mouse driver.
33
*
44
* 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.
66
*
77
* This program is free software; you can redistribute it and/or
88
* modify it under the terms of the GNU General Public License
@@ -33,6 +33,7 @@
3333
/* Finger-sensing Pad control registers */
3434
#define FSP_REG_SYSCTL1 0x10
3535
#define FSP_BIT_EN_REG_CLK BIT(5)
36+
#define FSP_REG_TMOD_STATUS 0x20
3637
#define FSP_REG_OPC_QDOWN 0x31
3738
#define FSP_BIT_EN_OPC_TAG BIT(7)
3839
#define FSP_REG_OPTZ_XLO 0x34

0 commit comments

Comments
 (0)