Henrik Rydberg | 14 Sep 16:51

[PATCH] input: bcm5974: Switch back to normal mode when closing

Staying in multi-touch mode after closing the device sometimes makes the keyboard drop keys or
repeat keys irratically. The conjecture is that some internal buffer starts to overflow,
resulting in undefined behavior. Switching back to normal mode when closing the device makes the
problem go away.

Signed-off-by: Henrik Rydberg <rydberg <at> euromail.se>
---
 drivers/input/mouse/bcm5974.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/input/mouse/bcm5974.c b/drivers/input/mouse/bcm5974.c
index 18f4d7f..2998a6a 100644
--- a/drivers/input/mouse/bcm5974.c
+++ b/drivers/input/mouse/bcm5974.c
@@ -351,8 +351,9 @@ static int report_tp_state(struct bcm5974 *dev, int size)
 #define BCM5974_WELLSPRING_MODE_REQUEST_VALUE		0x300
 #define BCM5974_WELLSPRING_MODE_REQUEST_INDEX		0
 #define BCM5974_WELLSPRING_MODE_VENDOR_VALUE		0x01
+#define BCM5974_WELLSPRING_MODE_NORMAL_VALUE		0x08

-static int bcm5974_wellspring_mode(struct bcm5974 *dev)
+static int bcm5974_wellspring_mode(struct bcm5974 *dev, bool on)
 {
 	char *data = kmalloc(8, GFP_KERNEL);
 	int retval = 0, size;
@@ -377,7 +378,9 @@ static int bcm5974_wellspring_mode(struct bcm5974 *dev)
 	}

 	/* apply the mode switch */
-	data[0] = BCM5974_WELLSPRING_MODE_VENDOR_VALUE;
(Continue reading)

Dmitry Torokhov | 14 Sep 17:18

Re: [PATCH] input: bcm5974: Switch back to normal mode when closing

Hi Henrik,

On Sun, Sep 14, 2008 at 04:54:59PM +0200, Henrik Rydberg wrote:
> Staying in multi-touch mode after closing the device sometimes makes the keyboard drop keys or
> repeat keys irratically. The conjecture is that some internal buffer starts to overflow,
> resulting in undefined behavior. Switching back to normal mode when closing the device makes the
> problem go away.
> 

Makes sense, will apply.

--

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Gmane