[adm5120] add USB drivers for the NFS-101U/WU profiles
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1118-fix-gsm-download-irq-balance-issue.patch.patch
1 From 129f349dc3ee75dfb0580436d82fd0d6633ba2c4 Mon Sep 17 00:00:00 2001
2 From: warmcat <andy@warmcat.com>
3 Date: Sun, 13 Apr 2008 07:25:55 +0100
4 Subject: [PATCH] fix-gsm-download-irq-balance-issue.patch
5
6 Signed-off-by: Andy Green <andy@openmoko.com>
7 ---
8 arch/arm/plat-s3c24xx/neo1973_pm_gsm.c | 28 +++++++++++++++++++++-------
9 1 files changed, 21 insertions(+), 7 deletions(-)
10
11 diff --git a/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c b/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
12 index b4ea8ba..c3292b8 100644
13 --- a/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
14 +++ b/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
15 @@ -146,13 +146,24 @@ static ssize_t gsm_write(struct device *dev, struct device_attribute *attr,
16 #endif
17 #ifdef CONFIG_MACH_NEO1973_GTA02
18 if (machine_is_neo1973_gta02()) {
19 - /* FIXME: Layering violation, we know how this relates to
20 - * the Jack-IRQ. And we assume the keyboard driver to be
21 - * around. */
22 - if (on)
23 - disable_irq(gpio_to_irq(GTA02_GPIO_JACK_INSERT));
24 - else
25 - enable_irq(gpio_to_irq(GTA02_GPIO_JACK_INSERT));
26 + /*
27 + * the keyboard / buttons driver requests and enables
28 + * the JACK_INSERT IRQ. We have to take care about
29 + * not enabling and disabling the IRQ when it was
30 + * already in that state or we get "unblanaced IRQ"
31 + * kernel warnings and stack dumps. So we use the
32 + * copy of the ndl_gsm state to figure out if we should
33 + * enable or disable the jack interrupt
34 + */
35 + if (on) {
36 + if (gta01_gsm.gpio_ndl_gsm)
37 + disable_irq(gpio_to_irq(
38 + GTA02_GPIO_JACK_INSERT));
39 + } else {
40 + if (!gta01_gsm.gpio_ndl_gsm)
41 + enable_irq(gpio_to_irq(
42 + GTA02_GPIO_JACK_INSERT));
43 + }
44
45 gta01_gsm.gpio_ndl_gsm = !on;
46 s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, !on);
47 @@ -263,7 +274,10 @@ static int __init gta01_gsm_probe(struct platform_device *pdev)
48 } else
49 gta01_gsm.con = NULL;
50
51 + /* note that download initially disabled, and enforce that */
52 gta01_gsm.gpio_ndl_gsm = 1;
53 + if (machine_is_neo1973_gta02())
54 + s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, 1);
55
56 return sysfs_create_group(&pdev->dev.kobj, &gta01_gsm_attr_group);
57 }
58 --
59 1.5.6.5
60
This page took 0.043032 seconds and 5 git commands to generate.