From 51f82d8be7acb8594e82d913d1b4577462703032 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Fri, 21 Nov 2008 11:56:57 +0000 Subject: 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 --- arch/arm/plat-s3c24xx/neo1973_pm_gps.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'arch/arm/plat-s3c24xx/neo1973_pm_gps.c') 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 +#include #include @@ -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) -- cgit v1.2.3