aboutsummaryrefslogtreecommitdiffstats
path: root/meta-moblin/packages/linux/linux-moblin-2.6.33.2/linux-2.6.34-moorestown-gpe-fix-for-sensor.patch
blob: dea7789e3c923e5acb21e48390f5cdcacfdfea70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
From 39fd545bb198f6e17e7e8f730535e3976088cd9f Mon Sep 17 00:00:00 2001
From: Alan Olsen <alan.r.olsen@intel.com>
Date: Fri, 26 Mar 2010 11:59:00 -0700
Subject: [PATCH] GPE fix for sensors

Patch-mainline: 2.6.35?

Signed-off-by: Alan Olsen <alan.r.olsen@intel.com>
---
 drivers/hwmon/emc1403.c |   53 ++++++++--------------------------------------
 1 files changed, 10 insertions(+), 43 deletions(-)

diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c
index 75e3b15..c94d933 100644
--- a/drivers/hwmon/emc1403.c
+++ b/drivers/hwmon/emc1403.c
@@ -33,7 +33,6 @@
 #include <linux/delay.h>
 #include <linux/mutex.h>
 #include <linux/sysfs.h>
-#include <linux/gpe.h>
 #include <linux/intel_mid.h>
 
 
@@ -624,48 +623,16 @@ static int  emc1403_probe(struct i2c_client *new_client,
 	data->therm_irq = t_irq & ~IRQ_TYPE_MASK;
 	data->alert_irq = a_irq & ~IRQ_TYPE_MASK;
 	/* interpret irq field */
-	if (data->therm_irq == 0x113) {
-		if (t_irq & IRQ_TYPE_MASK) {
-			/* irq -> GPE_ID */
-			res = request_gpe(data->therm_irq,
-				(gpio_function_t)therm_interrupt_handler,
-				 data, DETECT_LEVEL_LOW);
-			if (res)
-				dev_crit(&new_client->dev, "%s(): cannot \
-					register therm gpe  \n", __func__);
-			} else {
-				res = request_irq(data->therm_irq,
-					therm_interrupt_handler,
-					DETECT_LEVEL_LOW, "emc1403", data);
-				if (res)
-					dev_crit(&new_client->dev, "%s(): \
-					cannot get therm IRQ\n", __func__);
-			}
-		} else {
-			printk(KERN_WARNING"emc1403: IRQ mismatch  \
-						sent for therm registration");
-		}
-		if (data->alert_irq == 0x114) {
-			if (a_irq & IRQ_TYPE_MASK) {
-				/* irq -> GPE_ID */
-				res = request_gpe(data->alert_irq,
-				(gpio_function_t)alert_interrupt_handler,
-				 data, DETECT_LEVEL_LOW);
-				if (res)
-					dev_crit(&new_client->dev, "%s(): \
-				cannot register alert gpe \n", __func__);
-			} else {
-				res = request_irq(data->alert_irq,
-				alert_interrupt_handler, DETECT_LEVEL_LOW,
-				"emc1403", data);
-			if (res)
-				dev_crit(&new_client->dev, "%s():  cannot \
+	res = request_irq(data->therm_irq, therm_interrupt_handler,
+				IRQ_TYPE_EDGE_FALLING, "emc1403_therm", data);
+	if (res)
+		dev_crit(&new_client->dev, "%s(): \
+				cannot get therm IRQ\n", __func__);
+	res = request_irq(data->alert_irq, alert_interrupt_handler,
+				IRQ_TYPE_EDGE_FALLING, "emc1403_alert", data);
+	if (res)
+		dev_crit(&new_client->dev, "%s():  cannot \
 					get alert IRQ\n", __func__);
-			}
-		} else {
-			printk(KERN_WARNING"emc1403: IRQ mismatch \
-						sent for alert registration");
-		}
 #endif
 	emc1403_set_default_config(new_client);
 	dev_info(&new_client->dev, "%s EMC1403 Thermal chip found \n",
-- 
1.6.0.6