aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/plat-s3c24xx
diff options
context:
space:
mode:
authorAndy Green <andy@openmoko.com>2008-11-21 11:56:57 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-21 11:56:57 +0000
commit51f82d8be7acb8594e82d913d1b4577462703032 (patch)
tree411fdd1f9b6efbd850b49a7b393b396d3cf3b5e7 /arch/arm/plat-s3c24xx
parent3afa93d57719fd9b1bf837f5609095237a4187c7 (diff)
introduce-om-gta03-features.patch
This patch adds a single file that is intended to do the job of the several neo1973_pm_* drivers used in GTA02. It exposes the /sys nodes /sys/bus/platform/devices/om-gta03.0/gps_power /sys/bus/platform/devices/om-gta03.0/gsm_power /sys/bus/platform/devices/om-gta03.0/usbhost_power /sys/bus/platform/devices/om-gta03.0/wlan_bt_power at the moment which allow power control of these subsystems. Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'arch/arm/plat-s3c24xx')
-rw-r--r--arch/arm/plat-s3c24xx/neo1973_pm_gps.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_gps.c b/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
index 89075693b9f..8f0a6291db4 100644
--- a/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
+++ b/arch/arm/plat-s3c24xx/neo1973_pm_gps.c
@@ -29,6 +29,7 @@
/* For GTA02 */
#include <mach/gta02.h>
+#include <linux/pcf50633.h>
#include <linux/regulator/consumer.h>
@@ -275,6 +276,8 @@ static int gps_power_1v5_get(void)
static void gps_pwron_set(int on)
{
+ neo1973_gps.power_was_on = !!on;
+
if (machine_is_neo1973_gta01())
neo1973_gpb_setpin(GTA01_GPIO_GPS_PWRON, on);
@@ -294,13 +297,12 @@ static void gps_pwron_set(int on)
/* don't let RX from unpowered GPS float */
s3c2410_gpio_pullup(S3C2410_GPH5, 1);
}
- if (on && !neo1973_gps.power_was_on)
+ if ((on) && (!neo1973_gps.power_was_on))
regulator_enable(neo1973_gps.regulator);
- else if (!on && neo1973_gps.power_was_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)