diff options
author | Sean McNeil <sean@mcneil.com> | 2008-11-19 17:11:01 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-11-19 17:11:01 +0000 |
commit | bbd01760afd1a08e0910e00cf0078edb39528481 (patch) | |
tree | 0ff494d32f0c06e1aa869698eb96fa65734b0c09 /arch | |
parent | dd6553078a7c14152d7c81e7d3923619720f79a6 (diff) |
fix-bt-cycle-power-around-regulator-voltage-change.patch
Don't change bt regulator at all if already at requested state, and
turn it to opposite on | off state before changing regulator voltage
and setting final state.
Signed-off-by: Sean McNeil <sean@mcneil.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-s3c24xx/neo1973_pm_bt.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_bt.c b/arch/arm/plat-s3c24xx/neo1973_pm_bt.c index de0faf20d3b..3d4021cd794 100644 --- a/arch/arm/plat-s3c24xx/neo1973_pm_bt.c +++ b/arch/arm/plat-s3c24xx/neo1973_pm_bt.c @@ -111,15 +111,17 @@ static ssize_t bt_write(struct device *dev, struct device_attribute *attr, #ifdef CONFIG_MACH_NEO1973_GTA02 case MACH_TYPE_NEO1973_GTA02: - neo1973_gpb_setpin(GTA02_GPIO_BT_EN, on ? 0 : 1); - if (on) - pcf50633_voltage_set(pcf50633_global, - PCF50633_REGULATOR_LDO4, 3200); + if (s3c2410_gpio_getpin(GTA02_GPIO_BT_EN) == on) + break; + neo1973_gpb_setpin(GTA02_GPIO_BT_EN, !on); + pcf50633_voltage_set(pcf50633_global, + PCF50633_REGULATOR_LDO4, on ? 3200 : 0); pcf50633_onoff_set(pcf50633_global, PCF50633_REGULATOR_LDO4, on); vol = pcf50633_voltage_get(pcf50633_global, PCF50633_REGULATOR_LDO4); dev_info(dev, "GTA02 Set PCF50633 LDO4 = %d\n", vol); + neo1973_gpb_setpin(GTA02_GPIO_BT_EN, on); break; #endif /* CONFIG_MACH_NEO1973_GTA02 */ |