summaryrefslogtreecommitdiff
path: root/recipes/linux/linux-rp-2.6.23/wm97xx-lg13-r0-fix-r0.patch
blob: 5ad0d8703dbb3c08cd9a57c3f79837b4d545d748 (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
 drivers/input/power.c                   |    2 +-
 drivers/input/touchscreen/Kconfig       |    2 +-
 drivers/input/touchscreen/wm97xx-core.c |   35 ++++++++++++++++---------------
 include/linux/wm97xx.h                  |    2 +-
 4 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/drivers/input/power.c b/drivers/input/power.c
index 4443e34..7aac875 100644
--- a/drivers/input/power.c
+++ b/drivers/input/power.c
@@ -156,7 +156,7 @@ static void power_event(struct input_handle *handle, unsigned int type,
 	}
 }
 
-static struct input_handle *power_connect(struct input_handler *handler,
+static int power_connect(struct input_handler *handler,
 					  struct input_dev *dev,
 					  const struct input_device_id *id)
 {
diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
index 6862e8f..9b532e9 100644
--- a/drivers/input/touchscreen/Kconfig
+++ b/drivers/input/touchscreen/Kconfig
@@ -247,7 +247,7 @@ config TOUCHSCREEN_TSC2101
 
 config TOUCHSCREEN_WM97XX
 	tristate "Support for WM97xx AC97 touchscreen controllers"
-	depends SND_AC97_BUS
+	depends AC97_BUS
 
 choice
 	prompt "WM97xx codec type"
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
index 9b2710e..d3ce3f3 100644
--- a/drivers/input/touchscreen/wm97xx-core.c
+++ b/drivers/input/touchscreen/wm97xx-core.c
@@ -84,6 +84,7 @@
 #include <linux/bitops.h>
 #include <linux/workqueue.h>
 #include <linux/device.h>
+#include <linux/freezer.h>
 #include <linux/wm97xx.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -241,14 +242,15 @@ WM97XX_STATUS_ATTR(gpio);
 
 static int wm97xx_sys_add(struct device *dev)
 {
+	int err;
 	if (aux_sys) {
-		device_create_file(dev, &dev_attr_aux1);
-		device_create_file(dev, &dev_attr_aux2);
-		device_create_file(dev, &dev_attr_aux3);
-		device_create_file(dev, &dev_attr_aux4);
+		err = device_create_file(dev, &dev_attr_aux1);    
+		err = device_create_file(dev, &dev_attr_aux2);
+		err = device_create_file(dev, &dev_attr_aux3);
+		err = device_create_file(dev, &dev_attr_aux4);
 	}
 	if (status_sys)
-		device_create_file(dev, &dev_attr_gpio);
+		err = device_create_file(dev, &dev_attr_gpio);
 	return 0;
 }
 
@@ -366,12 +368,12 @@ void wm97xx_config_gpio(struct wm97xx *wm, u32 gpio, wm97xx_gpio_dir_t dir,
 
 /*
  * Handle a pen down interrupt.
- */
-static void wm97xx_pen_irq_worker(void *ptr)
-{
-	struct wm97xx *wm = (struct wm97xx *) ptr;
-
-	/* do we need to enable the touch panel reader */
+ */ 
+static void wm97xx_pen_irq_worker(struct work_struct *work) 
+{		     
+	struct wm97xx *wm = container_of(work, struct wm97xx, pen_event_work);
+	
+	/* do we need to enable the touch panel reader */ 
 	if (wm->id == WM9705_ID2) {
 		if (wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD) & WM97XX_PEN_DOWN)
 			wm->pen_is_down = 1;
@@ -411,9 +413,8 @@ static void wm97xx_pen_irq_worker(void *ptr)
  * We have to disable the codec interrupt in the handler because it can
  * take upto 1ms to clear the interrupt source. The interrupt is then enabled
  * again in the slow handler when the source has been cleared.
- */
-static irqreturn_t wm97xx_pen_interrupt(int irq, void *dev_id,
-					struct pt_regs *regs)
+ */ 
+static irqreturn_t wm97xx_pen_interrupt(int irq, void *dev_id)
 {
 	struct wm97xx *wm = (struct wm97xx *) dev_id;
 	disable_irq(wm->pen_irq);
@@ -428,15 +429,15 @@ static int wm97xx_init_pen_irq(struct wm97xx *wm)
 {
 	u16 reg;
 
-	INIT_WORK(&wm->pen_event_work, wm97xx_pen_irq_worker, wm);
-	if ((wm->pen_irq_workq =
+	INIT_WORK(&wm->pen_event_work, wm97xx_pen_irq_worker);
+	if ((wm->pen_irq_workq = 
 		create_singlethread_workqueue("kwm97pen")) == NULL) {
 		err("could not create pen irq work queue");
 		wm->pen_irq = 0;
 		return -EINVAL;
 	}
 
-	if (request_irq (wm->pen_irq, wm97xx_pen_interrupt, SA_SHIRQ, "wm97xx-pen", wm)) {
+	if (request_irq (wm->pen_irq, wm97xx_pen_interrupt, IRQF_SHARED, "wm97xx-pen", wm)) {
 		err("could not register codec pen down interrupt, will poll for pen down");
 		destroy_workqueue(wm->pen_irq_workq);
 		wm->pen_irq = 0;
diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h
index b1c1740..a9bd57e 100644
--- a/include/linux/wm97xx.h
+++ b/include/linux/wm97xx.h
@@ -243,7 +243,7 @@ struct wm97xx {
 	u16 dig_save[3];		/* saved during aux reading */
 	struct wm97xx_codec_drv *codec;	/* attached codec driver*/
 	struct input_dev* input_dev;	/* touchscreen input device */
-	ac97_t *ac97;			/* ALSA codec access */
+	struct snd_ac97 *ac97;			/* ALSA codec access */
 	struct device *dev;		/* ALSA device */
     struct device *battery_dev;
     struct device *touch_dev;