diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-03-14 15:52:42 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-03-14 15:52:42 +0000 |
commit | 26e3776a22bf894ced5af4c28968dc1dc99968eb (patch) | |
tree | 2d38a3789e27a423439c37a45a09cae31990a615 /target/linux/s3c24xx/patches-2.6.26/1104-Enable-GPS-only-if-it-was-powered-on-before-suspendi.patch | |
parent | 4bd70fc26256cf485f19e0c8b881e078dc36134f (diff) |
nuke obsolete kernel stuff
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14875 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/s3c24xx/patches-2.6.26/1104-Enable-GPS-only-if-it-was-powered-on-before-suspendi.patch')
-rwxr-xr-x | target/linux/s3c24xx/patches-2.6.26/1104-Enable-GPS-only-if-it-was-powered-on-before-suspendi.patch | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/target/linux/s3c24xx/patches-2.6.26/1104-Enable-GPS-only-if-it-was-powered-on-before-suspendi.patch b/target/linux/s3c24xx/patches-2.6.26/1104-Enable-GPS-only-if-it-was-powered-on-before-suspendi.patch deleted file mode 100755 index b230c3bda..000000000 --- a/target/linux/s3c24xx/patches-2.6.26/1104-Enable-GPS-only-if-it-was-powered-on-before-suspendi.patch +++ /dev/null @@ -1,85 +0,0 @@ -From f44eb50db93450c790f398379215431fa9959511 Mon Sep 17 00:00:00 2001 -From: Holger Freyther <zecke@openmoko.org> -Date: Fri, 25 Jul 2008 23:06:04 +0100 -Subject: [PATCH] Enable GPS only if it was powered on before suspending the device - - Similar to the neo1974_pm_gsm.c keep a static struct around. On suspend - we will save the current power state, on resume we will use this - information to enable power of the GPS only when it was powered on before. - This is passing basic tests with screen /dev/ttySAC1 on suspend and resume. - - Only do this for the GTA02 as I don't have a gllin setup for the GTA01 - - I wonder why the suspend and resume code is not using gps_pwron_set and why - for the GTA02 we need to keep the state of the GPIOs, this should be done - by the s3c code. - -Signed-Off-by: Holger Frether <zecke@openmoko.org> ---- - arch/arm/plat-s3c24xx/neo1973_pm_gps.c | 22 ++++++++++++++-------- - 1 files changed, 14 insertions(+), 8 deletions(-) - -diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_gps.c b/arch/arm/plat-s3c24xx/neo1973_pm_gps.c -index e8cfb96..b12f7bc 100644 ---- a/arch/arm/plat-s3c24xx/neo1973_pm_gps.c -+++ b/arch/arm/plat-s3c24xx/neo1973_pm_gps.c -@@ -30,6 +30,12 @@ - #include <linux/pcf50633.h> - #endif - -+struct neo1973_pm_gps_data { -+ int power_was_on; -+}; -+ -+static struct neo1973_pm_gps_data neo1973_gps; -+ - /* This is the 2.8V supply for the RTC crystal, the mail clock crystal and - * the input to VDD_RF */ - static void gps_power_2v8_set(int on) -@@ -266,8 +272,8 @@ static void gps_pwron_set(int on) - if (on) - pcf50633_voltage_set(pcf50633_global, - PCF50633_REGULATOR_LDO5, 3000); -- pcf50633_onoff_set(pcf50633_global, -- PCF50633_REGULATOR_LDO5, on); -+ pcf50633_onoff_set(pcf50633_global, -+ PCF50633_REGULATOR_LDO5, on); - } - #endif /* CONFIG_MACH_NEO1973_GTA02 */ - } -@@ -476,6 +482,9 @@ static DEVICE_ATTR(power_sequence, 0644, power_sequence_read, - static int gta01_pm_gps_suspend(struct platform_device *pdev, - pm_message_t state) - { -+ -+ neo1973_gps.power_was_on = gps_pwron_get(); -+ - #ifdef CONFIG_MACH_NEO1973_GTA01 - if (machine_is_neo1973_gta01()) { - /* FIXME */ -@@ -491,9 +500,7 @@ static int gta01_pm_gps_suspend(struct platform_device *pdev, - /* don't let RX from unpowered GPS float */ - s3c2410_gpio_pullup(S3C2410_GPH5, 1); - -- /* FIXME */ -- pcf50633_onoff_set(pcf50633_global, -- PCF50633_REGULATOR_LDO5, 0); -+ gps_pwron_set(0); - } - #endif /* CONFIG_MACH_NEO1973_GTA02 */ - -@@ -519,9 +526,8 @@ static int gta01_pm_gps_resume(struct platform_device *pdev) - /* remove pulldown now it won't be floating any more */ - s3c2410_gpio_pullup(S3C2410_GPH5, 0); - -- /* FIXME */ -- pcf50633_onoff_set(pcf50633_global, -- PCF50633_REGULATOR_LDO5, 1); -+ if (neo1973_gps.power_was_on) -+ gps_pwron_set(1); - #endif /* CONFIG_MACH_NEO1973_GTA02 */ - } - return 0; --- -1.5.6.3 - |