[Zaurus-devel] Suspend issues

2010-02-08 Thread Vitaly Minko
I've installed 2.6.33-rc6 on my Akita. Works fine in general. Here are 
few annoying issues I found:
1. When I hold on/off button for 1-2 seconds while resuming, Zaurus 
blinks for a moment and dies. Just black screen. Looks like it tries to 
suspend right after resuming. I've fixed this issue for 2.6.24 using the 
attachment. I tried to apply this patch to 2.6.33, but it doesn't help.
2. WiFi connection does not recover after suspend. I have to reload 
modules and reestablish connection manually.
diff -ur a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c
--- a/arch/arm/mach-pxa/spitz_pm.c  2009-11-05 17:55:57.0 +0300
+++ b/arch/arm/mach-pxa/spitz_pm.c  2009-11-05 17:54:54.0 +0300
@@ -153,8 +153,10 @@
return 0;
}
 
-   if (PEDR  GPIO_bit(SPITZ_GPIO_KEY_INT))
-   is_resume |= GPIO_bit(SPITZ_GPIO_KEY_INT);
+/* Do not resume when lid is closed */
+   if (((GPLR(SPITZ_GPIO_ON_KEY)  GPIO_bit(SPITZ_GPIO_ON_KEY)) != 0) 
+((GPLR(SPITZ_GPIO_SWA)  GPIO_bit(SPITZ_GPIO_SWA)) == 
0))
+   is_resume |= GPIO_bit(SPITZ_GPIO_ON_KEY);
 
if (PKSR  GPIO_bit(SPITZ_GPIO_SYNC))
is_resume |= GPIO_bit(SPITZ_GPIO_SYNC);
diff -ur a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c
--- a/drivers/input/keyboard/spitzkbd.c 2009-11-05 17:55:26.0 +0300
+++ b/drivers/input/keyboard/spitzkbd.c 2009-11-05 17:54:55.0 +0300
@@ -220,7 +220,9 @@
input_report_key(spitzkbd_data-input, SPITZ_KEY_SYNC, 
(GPLR(SPITZ_GPIO_SYNC)  GPIO_bit(SPITZ_GPIO_SYNC)) != 0 );
input_report_key(spitzkbd_data-input, KEY_SUSPEND, pwrkey);
 
-   if (pwrkey  time_after(jiffies, spitzkbd_data-suspend_jiffies + 
msecs_to_jiffies(1000))) {
+/* Do not suspend when lid is closed */
+   if (pwrkey  ((GPLR(SPITZ_GPIO_SWA)  GPIO_bit(SPITZ_GPIO_SWA)) == 0) 

+time_after(jiffies, spitzkbd_data-suspend_jiffies + 
msecs_to_jiffies(2000))) {
input_event(spitzkbd_data-input, EV_PWR, KEY_SUSPEND, 1);
spitzkbd_data-suspend_jiffies = jiffies;
}
___
Zaurus-devel mailing list
Zaurus-devel@lists.linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/zaurus-devel


Re: [Zaurus-devel] Suspend issues

2010-02-08 Thread Stanislav Brabec
On Mon, 2010-02-08 at 19:16 +0300, Vitaly Minko wrote:
 I've installed 2.6.33-rc6 on my Akita. Works fine in general. Here are 
 few annoying issues I found:
 1. When I hold on/off button for 1-2 seconds while resuming, Zaurus 
 blinks for a moment and dies.

Only suspends, next short press will resume for me.

I guess it is related with the level triggered resume, where driver
expects edge triggered resume.
See the thread
sharp c-3000 aka spitz: fix warn_on introduced in 2.6.32-rc1
/
gpio_keys and how PXA27x sets gpio_set_wake()

If this is not the source of problems, then there are key debouncing
problems.

-- 
Stanislav Brabec
http://www.penguin.cz/~utx/zaurus


___
Zaurus-devel mailing list
Zaurus-devel@lists.linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/zaurus-devel