From ab0a466054d12647d906cf3a9ac9cb19cbd7607b Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Wed, 19 Nov 2008 17:09:38 +0000 Subject: [neo] Every access to GPIO bank B has to go through the shadow code - Any setting of any PIN on bank B will undo the LED setting. Introduce neo1973_gpb_set_pin to set the PIN in a way not losing the LED or any other shadowed setting. - Update users of GPBXY for gta01 and gta02. Signed-Off-By: Holger Freyther --- arch/arm/plat-s3c24xx/neo1973_pm_bt.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'arch/arm/plat-s3c24xx/neo1973_pm_bt.c') diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_bt.c b/arch/arm/plat-s3c24xx/neo1973_pm_bt.c index a9694b4c1c4..dfc9ae8e9f4 100644 --- a/arch/arm/plat-s3c24xx/neo1973_pm_bt.c +++ b/arch/arm/plat-s3c24xx/neo1973_pm_bt.c @@ -18,6 +18,7 @@ #include #include +#include #ifdef CONFIG_MACH_NEO1973_GTA01 #include @@ -95,20 +96,20 @@ static ssize_t bt_write(struct device *dev, struct device_attribute *attr, /* if we are powering up, assert reset, then power, * then release reset */ if (on) { - s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, 0); + neo1973_gpb_setpin(GTA01_GPIO_BT_EN, 0); pcf50606_voltage_set(pcf50606_global, PCF50606_REGULATOR_D1REG, 3100); } pcf50606_onoff_set(pcf50606_global, PCF50606_REGULATOR_D1REG, on); - s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, on); + neo1973_gpb_setpin(GTA01_GPIO_BT_EN, on); break; #endif /* CONFIG_MACH_NEO1973_GTA01 */ #ifdef CONFIG_MACH_NEO1973_GTA02 case MACH_TYPE_NEO1973_GTA02: - s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, on ? 0 : 1); + neo1973_gpb_setpin(GTA02_GPIO_BT_EN, on ? 0 : 1); if (on) pcf50633_voltage_set(pcf50633_global, PCF50633_REGULATOR_LDO4, 3200); @@ -127,13 +128,13 @@ static ssize_t bt_write(struct device *dev, struct device_attribute *attr, #ifdef CONFIG_MACH_NEO1973_GTA01 case MACH_TYPE_NEO1973_GTA01: - s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, on ? 0 : 1); + neo1973_gpb_setpin(GTA01_GPIO_BT_EN, on ? 0 : 1); break; #endif /* CONFIG_MACH_NEO1973_GTA01 */ #ifdef CONFIG_MACH_NEO1973_GTA02 case MACH_TYPE_NEO1973_GTA02: - s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, on ? 0 : 1); + neo1973_gpb_setpin(GTA02_GPIO_BT_EN, on ? 0 : 1); break; #endif /* CONFIG_MACH_NEO1973_GTA02 */ @@ -192,7 +193,7 @@ static int __init gta01_bt_probe(struct platform_device *pdev) PCF50606_REGULATOR_D1REG, 0); /* we pull reset to low to make sure that the chip doesn't * drain power through the reset line */ - s3c2410_gpio_setpin(GTA01_GPIO_BT_EN, 0); + neo1973_gpb_setpin(GTA01_GPIO_BT_EN, 0); break; #endif /* CONFIG_MACH_NEO1973_GTA01 */ @@ -203,7 +204,7 @@ static int __init gta01_bt_probe(struct platform_device *pdev) PCF50633_REGULATOR_LDO4, 0); /* we pull reset to low to make sure that the chip doesn't * drain power through the reset line */ - s3c2410_gpio_setpin(GTA02_GPIO_BT_EN, 0); + neo1973_gpb_setpin(GTA02_GPIO_BT_EN, 0); break; #endif /* CONFIG_MACH_NEO1973_GTA02 */ -- cgit v1.2.3