Author: titmuss
Date: Wed Apr 30 09:53:30 2008
New Revision: 2411
URL: http://svn.slimdevices.com?rev=2411&root=Jive&view=rev
Log:
[EMAIL PROTECTED] (orig r2406): titmuss | 2008-04-30 14:14:09 +0100
[EMAIL PROTECTED] (orig r2404): titmuss | 2008-04-30 14:12:54 +0100
Bug: N/A
Description:
Cancel all outstanding requests when disconnecting on Comet. This fixes
firmware downgrading from 7.0.1 to 7.0.
[EMAIL PROTECTED] (orig r2410): titmuss | 2008-04-30 17:53:14 +0100
[EMAIL PROTECTED] (orig r2409): titmuss | 2008-04-30 17:39:43 +0100
Bug: N/A
Description:
Tweak when the wheel moves between irq and polling modes. It looks like
during the transition some
clicks could get lost.
Modified:
7.2/trunk/ (props changed)
7.2/trunk/squeezeos/src/s3c2412/linux-2.6.22/drivers/char/jive/jive_wheel.c
Propchange: 7.2/trunk/
------------------------------------------------------------------------------
--- svk:merge (original)
+++ svk:merge Wed Apr 30 09:53:30 2008
@@ -1,5 +1,5 @@
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.0/trunk:2395
-bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.1/trunk:2400
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.0/trunk:2409
+bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/7.1/trunk:2410
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/7.0:2013
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/SN:1083
bbe22326-0783-4b3a-ac2b-7ab96b24c8d9:/branches/scrolling:1378
Modified:
7.2/trunk/squeezeos/src/s3c2412/linux-2.6.22/drivers/char/jive/jive_wheel.c
URL:
http://svn.slimdevices.com/7.2/trunk/squeezeos/src/s3c2412/linux-2.6.22/drivers/char/jive/jive_wheel.c?rev=2411&root=Jive&r1=2410&r2=2411&view=diff
==============================================================================
--- 7.2/trunk/squeezeos/src/s3c2412/linux-2.6.22/drivers/char/jive/jive_wheel.c
(original)
+++ 7.2/trunk/squeezeos/src/s3c2412/linux-2.6.22/drivers/char/jive/jive_wheel.c
Wed Apr 30 09:53:30 2008
@@ -55,7 +55,7 @@
#define PULSES_PER_DETENT 2
-#define DEBOUNCE_PERIOD_MS 2
+#define DEBOUNCE_PERIOD_MS 4
#define PRESS_TIME_MS 4
#define RELEASE_TIME_MS 40
@@ -66,8 +66,6 @@
static unsigned int state[PRESS_TIME_MS / DEBOUNCE_PERIOD_MS];
static unsigned int last_button;
-
-static unsigned int count;
static unsigned int index;
@@ -107,12 +105,6 @@
AB &= state[i];
}
- /* reset after a second */
- if (jiffies > click_jiffies + HZ/2) {
- pos = 0;
- click_jiffies = jiffies;
- }
-
/* CW rotation:
* A B C D (CD are previous AB state)
@@ -140,7 +132,6 @@
case 0xE:
/* CW rotation */
pos += 1;
- count = 0;
lastAB = AB;
click_jiffies = jiffies;
break;
@@ -151,7 +142,6 @@
case 0xD:
/* CCW rotation */
pos -= 1;
- count = 0;
lastAB = AB;
click_jiffies = jiffies;
break;
@@ -191,11 +181,17 @@
pos = 0;
}
- if (count++ < (RELEASE_TIME_MS / DEBOUNCE_PERIOD_MS) || button > 0) {
+ /* scan until 0.5 seconds of inactiviy */
+ if (jiffies < click_jiffies + HZ/2 || button > 0) {
+
/* keep scanning while wheel is rotating */
mod_timer(&wheel_timer, jiffies + (DEBOUNCE_PERIOD_MS *
HZ/1000));
}
else {
+
+ /* reset wheel to center of detent */
+ pos = 0;
+
/* return the lines to interrupt */
s3c2410_gpio_cfgpin(S3C2410_GPG4, S3C2410_GPIO_SFN2);
s3c2410_gpio_cfgpin(S3C2410_GPG5, S3C2410_GPIO_SFN2);
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins