jeffrey.ratcli...@gmail.com wrote:
> Further tests show that
> 
> 1. after resume, Navit does not get another GPS fix
> 2. leaving Navit open, and on forcing a cold start with agpsui, agpsui
> does not even see the time signal (I assume Navit blocks it), but this
> is enough for Navit to get a fix
> 
> So at least there is a workaround.

As I wrote already, there is a bug in kernel GPS suspend/resume code which
leads to GPS not being powered after resume. Simply re-enable it manually via
Settings, or apply my patch sent to kernel list (but still not merged into git)
- http://lists.openmoko.org/pipermail/openmoko-kernel/2009-January/007447.html

I'm attaching also a version against stable.git for those still running 2.6.24..

Regards,
  Vladimir

> It would be nice if there was some primitive GPS UI built into Navit.
> 
> Regards
> 
> Jeff
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Openmoko community mailing list
> community@lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community

commit 98c1e4301f98d977443104d6206d8ebc91b18bf3
Author: Vladimir Koutny <vl...@ksp.sk>
Date:   Mon Jan 5 14:16:01 2009 +0100

    Fix re-enabling of GPS on resume
    
    The call to gps_pwron_set(0) during suspend would clear power_was_on
    flag so the on/off status was always lost
    
    Signed-off-by: Vladimir Koutny <vl...@ksp.sk>

diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_gps.c b/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
index 73337fa..5ca6691 100644
--- a/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
+++ b/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
@@ -300,8 +300,6 @@ static void gps_pwron_set(int on)
 		if ((!on) && (neo1973_gps.power_was_on))
 			regulator_disable(neo1973_gps.regulator);
 	}
-
-	neo1973_gps.power_was_on = !!on;
 }
 
 static int gps_pwron_get(void)
@@ -358,13 +356,12 @@ static ssize_t power_gps_write(struct device *dev,
 {
 	unsigned long on = simple_strtoul(buf, NULL, 10);
 
-	if (!strcmp(attr->attr.name, "pwron"))
-#ifdef CONFIG_MACH_NEO1973_GTA01
-{
-#endif
+	if (!strcmp(attr->attr.name, "pwron")) {
 		gps_pwron_set(on);
+		neo1973_gps.power_was_on = !!on;
+	}
 #ifdef CONFIG_MACH_NEO1973_GTA01
-	} else if (!strcmp(attr->attr.name, "power_avdd_3v")) {
+	else if (!strcmp(attr->attr.name, "power_avdd_3v")) {
 		gps_power_3v_set(on);
 	} else if (!strcmp(attr->attr.name, "power_tcxo_2v8")) {
 		gps_power_2v8_set(on);
commit e96e0fbc123a1b6cbd8cef6f82dc559124cbcad5
Author: Vladimir Koutny <vl...@ksp.sk>
Date:   Mon Jan 5 22:35:35 2009 +0100

    Fix re-enabling of GPS on resume
    
    The call to gps_pwron_set(0) during suspend would clear power_was_on
    flag so the on/off status was always lost
    
    Signed-off-by: Vladimir Koutny <vl...@ksp.sk>

diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_gps.c b/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
index a21b763..7d56562 100644
--- a/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
+++ b/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
@@ -271,9 +271,6 @@ static int gps_power_1v5_get(void)
 /* This is the POWERON pin */
 static void gps_pwron_set(int on)
 {
-
-	neo1973_gps.power_was_on = !!on;
-
 #ifdef CONFIG_MACH_NEO1973_GTA01
 	if (machine_is_neo1973_gta01())
 		neo1973_gpb_setpin(GTA01_GPIO_GPS_PWRON, on);
@@ -393,6 +390,7 @@ static ssize_t power_gps_write(struct device *dev,
 	} else if (!strcmp(attr->attr.name, "power_avdd_3v")) {
 		gps_power_3v_set(on);
 	} else if (!strcmp(attr->attr.name, "pwron")) {
+		neo1973_gps.power_was_on = !!on;
 		gps_pwron_set(on);
 	} else if (!strcmp(attr->attr.name, "reset")) {
 		gps_rst_set(on);

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community

Reply via email to