diff options
author | Werner Almesberger <werner@openmoko.org> | 2009-01-19 01:18:06 +0000 |
---|---|---|
committer | Andy Green <agreen@octopus.localdomain> | 2009-01-19 01:18:06 +0000 |
commit | d1184dc21448404d2e274ce5a5a95b98878a624f (patch) | |
tree | 0b3ec65f9a6de67d0ae0f295a29c86ade03bbe7f /arch/arm/mach-s3c2440/mach-gta02.c | |
parent | cde71aa787eb9f986c04da58e9f9130be2ac52eb (diff) |
clean up GTA02 WLAN power control
This patch cleans up the GTA02 WLAN power control platform device:
- remove misleading /sys/devices/platform/gta02-pm-wlan.0/power_on
Users really wishing to play with reset can just gpio j12=0
- rename gta02_wlan_power to gta02_wlan_reset, because that's what it
truly is
- remove handling of GTA02_CHIP_PWD because
- it's not used, say our schematics
- even if it is, it's sampled long before we could affect it
- move SDIO-specific conversion from "power switch" to "reset
button" logic from gta02_wlan_reset to gta02_s3c_mmc_set_power
- removed mutex protection because we now only have a single user
A note in passing: we can probably do away with gta02_pm_wlan
completely once upstream rfkill adds better support for type-based
control.
Signed-off-by: Werner Almesberger <werner@openmoko.org>
Diffstat (limited to 'arch/arm/mach-s3c2440/mach-gta02.c')
-rw-r--r-- | arch/arm/mach-s3c2440/mach-gta02.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c index cff7affa0d7..a32a11e3135 100644 --- a/arch/arm/mach-s3c2440/mach-gta02.c +++ b/arch/arm/mach-s3c2440/mach-gta02.c @@ -955,9 +955,13 @@ static struct s3c2410_platform_nand gta02_nand_info = { static void gta02_s3c_mmc_set_power(unsigned char power_mode, unsigned short vdd) { - gta02_wlan_power( - power_mode == MMC_POWER_ON || - power_mode == MMC_POWER_UP); + static int is_on = -1; + int on; + + on = power_mode == MMC_POWER_ON || power_mode == MMC_POWER_UP; + if (is_on != on) + gta02_wlan_reset(!on); + is_on = on; } |