]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Input: sentelic - fix retrieving number of buttons
authorTai-hwa Liang <avatar@sentelic.com>
Thu, 29 Dec 2011 17:47:36 +0000 (09:47 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 29 Dec 2011 17:52:59 +0000 (09:52 -0800)
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>
drivers/input/mouse/sentelic.c
drivers/input/mouse/sentelic.h

index a2c15e9a8e79a68c517f2a33c985190b329f2366..86d6f39178b0d556364df951ca33575598bfa416 100644 (file)
@@ -2,7 +2,7 @@
  * Finger Sensing Pad PS/2 mouse driver.
  *
  * Copyright (C) 2005-2007 Asia Vital Components Co., Ltd.
- * Copyright (C) 2005-2010 Tai-hwa Liang, Sentelic Corporation.
+ * Copyright (C) 2005-2011 Tai-hwa Liang, Sentelic Corporation.
  *
  *   This program is free software; you can redistribute it and/or
  *   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)
        };
        int val;
 
-       if (fsp_reg_read(psmouse, FSP_REG_TMOD_STATUS1, &val) == -1)
+       if (fsp_reg_read(psmouse, FSP_REG_TMOD_STATUS, &val) == -1)
                return -EIO;
 
        *btn = buttons[(val & 0x30) >> 4];
index ed1395ac7b8b3e11960ae51c7c92c7f51b615fc9..2e4af24f8c1586b6ecfb3c7f8325cbeb34eb4ae5 100644 (file)
@@ -2,7 +2,7 @@
  * Finger Sensing Pad PS/2 mouse driver.
  *
  * Copyright (C) 2005-2007 Asia Vital Components Co., Ltd.
- * Copyright (C) 2005-2009 Tai-hwa Liang, Sentelic Corporation.
+ * Copyright (C) 2005-2011 Tai-hwa Liang, Sentelic Corporation.
  *
  *   This program is free software; you can redistribute it and/or
  *   modify it under the terms of the GNU General Public License
@@ -33,6 +33,7 @@
 /* Finger-sensing Pad control registers */
 #define        FSP_REG_SYSCTL1         0x10
 #define        FSP_BIT_EN_REG_CLK      BIT(5)
+#define        FSP_REG_TMOD_STATUS     0x20
 #define        FSP_REG_OPC_QDOWN       0x31
 #define        FSP_BIT_EN_OPC_TAG      BIT(7)
 #define        FSP_REG_OPTZ_XLO        0x34