[PATCH] gta02-pm-gps.patch

Werner Almesberger werner at openmoko.org
Thu Feb 21 06:49:28 CET 2008


Willie wrote:
> This is GPS driver for GTA02. It deals with power on/off GPS module.
> The GPS data can be generated through UART1.

Thanks ! I've applied it in revision 4092, with the small change below.

- Werner

---------------------------------- cut here -----------------------------------

Index: linux-2.6.24/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
===================================================================
--- linux-2.6.24.orig/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
+++ linux-2.6.24/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
@@ -625,13 +625,17 @@ static int __init gta01_pm_gps_probe(str
 static int gta01_pm_gps_remove(struct platform_device *pdev)
 {
 #ifdef CONFIG_MACH_NEO1973_GTA01
-	gps_power_sequence_down();
-	sysfs_remove_group(&pdev->dev.kobj, &gta01_gps_attr_group);
+	if (machine_is_neo1973_gta01()) {
+		gps_power_sequence_down();
+		sysfs_remove_group(&pdev->dev.kobj, &gta01_gps_attr_group);
+	}
 #endif /* CONFIG_MACH_NEO1973_GTA01 */
 
 #ifdef CONFIG_MACH_NEO1973_GTA02
-	pcf50633_onoff_set(pcf50633_global, PCF50633_REGULATOR_LDO5, 0);
-	sysfs_remove_group(&pdev->dev.kobj, &gta02_gps_attr_group);
+	if (machine_is_neo1973_gta02()) {
+		pcf50633_onoff_set(pcf50633_global, PCF50633_REGULATOR_LDO5, 0);
+		sysfs_remove_group(&pdev->dev.kobj, &gta02_gps_attr_group);
+	}
 #endif /* CONFIG_MACH_NEO1973_GTA02 */
 	return 0;
 }




More information about the openmoko-kernel mailing list