aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bonn <jonas.bonn@gmail.com>2008-11-19 17:10:56 +0000
committerAndy Green <agreen@pads.home.warmcat.com>2008-11-19 17:10:56 +0000
commit0d8e831a467b044c393a0975fd0adad187c6d976 (patch)
tree04ded9ec73ee6150e79ae53b00b670b88d201b37
parent31381aa33f1d494eb8af94f41de8c8c1192b5d8f (diff)
GTA02: Fixups
These fixes are required to build without MACH_NEO1973_GTA02 Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com>
-rw-r--r--arch/arm/plat-s3c24xx/neo1973_pm_gsm.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c b/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
index 2f4c872d1a9..5d721f38dd3 100644
--- a/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
+++ b/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
@@ -73,15 +73,19 @@ static ssize_t gsm_read(struct device *dev, struct device_attribute *attr,
} else if (!strcmp(attr->attr.name, "reset")) {
if (machine_is_neo1973_gta01() && s3c2410_gpio_getpin(GTA01_GPIO_MODEM_RST))
goto out_1;
+#ifdef CONFIG_MACH_NEO1973_GTA02
else if (machine_is_neo1973_gta02() && s3c2410_gpio_getpin(GTA02_GPIO_MODEM_RST))
goto out_1;
+#endif
} else if (!strcmp(attr->attr.name, "download")) {
if (machine_is_neo1973_gta01()) {
if (s3c2410_gpio_getpin(GTA01_GPIO_MODEM_DNLOAD))
goto out_1;
+#ifdef CONFIG_MACH_NEO1973_GTA02
} else if (machine_is_neo1973_gta02()) {
if (!s3c2410_gpio_getpin(GTA02_GPIO_nDL_GSM))
goto out_1;
+#endif
}
} else if (!strcmp(attr->attr.name, "flowcontrolled")) {
if (s3c2410_gpio_getcfg(S3C2410_GPH1) == S3C2410_GPIO_OUTPUT)
@@ -155,12 +159,15 @@ static ssize_t gsm_write(struct device *dev, struct device_attribute *attr,
} else if (!strcmp(attr->attr.name, "reset")) {
if (machine_is_neo1973_gta01())
neo1973_gpb_setpin(GTA01_GPIO_MODEM_RST, on);
+#ifdef CONFIG_MACH_NEO1973_GTA02
else if (machine_is_neo1973_gta02())
neo1973_gpb_setpin(GTA02_GPIO_MODEM_RST, on);
+#endif
} else if (!strcmp(attr->attr.name, "download")) {
if (machine_is_neo1973_gta01())
s3c2410_gpio_setpin(GTA01_GPIO_MODEM_DNLOAD, on);
+#ifdef CONFIG_MACH_NEO1973_GTA02
if (machine_is_neo1973_gta02()) {
/*
* the keyboard / buttons driver requests and enables
@@ -184,6 +191,7 @@ static ssize_t gsm_write(struct device *dev, struct device_attribute *attr,
gta01_gsm.gpio_ndl_gsm = !on;
s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, !on);
}
+#endif
} else if (!strcmp(attr->attr.name, "flowcontrolled")) {
if (on) {
gta_gsm_interrupts = 0;
@@ -216,9 +224,10 @@ static int gta01_gsm_suspend(struct platform_device *pdev, pm_message_t state)
}
/* disable DL GSM to prevent jack_insert becoming 'floating' */
+#ifdef CONFIG_MACH_NEO1973_GTA02
if (machine_is_neo1973_gta02())
s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, 1);
-
+#endif
return 0;
busy:
@@ -246,8 +255,10 @@ static int gta01_gsm_resume(struct platform_device *pdev)
if (gta01_gsm.con && s3c2410_gpio_getpin(GTA01_GPIO_MODEM_ON))
console_stop(gta01_gsm.con);
+#ifdef CONFIG_MACH_NEO1973_GTA02
if (machine_is_neo1973_gta02())
s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, gta01_gsm.gpio_ndl_gsm);
+#endif
return 0;
}
@@ -322,8 +333,10 @@ static int __init gta01_gsm_probe(struct platform_device *pdev)
/* note that download initially disabled, and enforce that */
gta01_gsm.gpio_ndl_gsm = 1;
+#ifdef CONFIG_MACH_NEO1973_GTA02
if (machine_is_neo1973_gta02())
s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, 1);
+#endif
return sysfs_create_group(&pdev->dev.kobj, &gta01_gsm_attr_group);
}