From d1184dc21448404d2e274ce5a5a95b98878a624f Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Mon, 19 Jan 2009 01:18:06 +0000 Subject: 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 --- arch/arm/mach-s3c2440/mach-gta02.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'arch/arm/mach-s3c2440') 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; } -- cgit v1.2.3