diff options
Diffstat (limited to 'meta/recipes-kernel/linux/linux-rp-2.6.23/wm97xx-lg13-r0-fix-r0.patch')
-rw-r--r-- | meta/recipes-kernel/linux/linux-rp-2.6.23/wm97xx-lg13-r0-fix-r0.patch | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux/linux-rp-2.6.23/wm97xx-lg13-r0-fix-r0.patch b/meta/recipes-kernel/linux/linux-rp-2.6.23/wm97xx-lg13-r0-fix-r0.patch new file mode 100644 index 0000000000..5ad0d8703d --- /dev/null +++ b/meta/recipes-kernel/linux/linux-rp-2.6.23/wm97xx-lg13-r0-fix-r0.patch | |||
@@ -0,0 +1,128 @@ | |||
1 | drivers/input/power.c | 2 +- | ||
2 | drivers/input/touchscreen/Kconfig | 2 +- | ||
3 | drivers/input/touchscreen/wm97xx-core.c | 35 ++++++++++++++++--------------- | ||
4 | include/linux/wm97xx.h | 2 +- | ||
5 | 4 files changed, 21 insertions(+), 20 deletions(-) | ||
6 | |||
7 | diff --git a/drivers/input/power.c b/drivers/input/power.c | ||
8 | index 4443e34..7aac875 100644 | ||
9 | --- a/drivers/input/power.c | ||
10 | +++ b/drivers/input/power.c | ||
11 | @@ -156,7 +156,7 @@ static void power_event(struct input_handle *handle, unsigned int type, | ||
12 | } | ||
13 | } | ||
14 | |||
15 | -static struct input_handle *power_connect(struct input_handler *handler, | ||
16 | +static int power_connect(struct input_handler *handler, | ||
17 | struct input_dev *dev, | ||
18 | const struct input_device_id *id) | ||
19 | { | ||
20 | diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig | ||
21 | index 6862e8f..9b532e9 100644 | ||
22 | --- a/drivers/input/touchscreen/Kconfig | ||
23 | +++ b/drivers/input/touchscreen/Kconfig | ||
24 | @@ -247,7 +247,7 @@ config TOUCHSCREEN_TSC2101 | ||
25 | |||
26 | config TOUCHSCREEN_WM97XX | ||
27 | tristate "Support for WM97xx AC97 touchscreen controllers" | ||
28 | - depends SND_AC97_BUS | ||
29 | + depends AC97_BUS | ||
30 | |||
31 | choice | ||
32 | prompt "WM97xx codec type" | ||
33 | diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c | ||
34 | index 9b2710e..d3ce3f3 100644 | ||
35 | --- a/drivers/input/touchscreen/wm97xx-core.c | ||
36 | +++ b/drivers/input/touchscreen/wm97xx-core.c | ||
37 | @@ -84,6 +84,7 @@ | ||
38 | #include <linux/bitops.h> | ||
39 | #include <linux/workqueue.h> | ||
40 | #include <linux/device.h> | ||
41 | +#include <linux/freezer.h> | ||
42 | #include <linux/wm97xx.h> | ||
43 | #include <asm/uaccess.h> | ||
44 | #include <asm/io.h> | ||
45 | @@ -241,14 +242,15 @@ WM97XX_STATUS_ATTR(gpio); | ||
46 | |||
47 | static int wm97xx_sys_add(struct device *dev) | ||
48 | { | ||
49 | + int err; | ||
50 | if (aux_sys) { | ||
51 | - device_create_file(dev, &dev_attr_aux1); | ||
52 | - device_create_file(dev, &dev_attr_aux2); | ||
53 | - device_create_file(dev, &dev_attr_aux3); | ||
54 | - device_create_file(dev, &dev_attr_aux4); | ||
55 | + err = device_create_file(dev, &dev_attr_aux1); | ||
56 | + err = device_create_file(dev, &dev_attr_aux2); | ||
57 | + err = device_create_file(dev, &dev_attr_aux3); | ||
58 | + err = device_create_file(dev, &dev_attr_aux4); | ||
59 | } | ||
60 | if (status_sys) | ||
61 | - device_create_file(dev, &dev_attr_gpio); | ||
62 | + err = device_create_file(dev, &dev_attr_gpio); | ||
63 | return 0; | ||
64 | } | ||
65 | |||
66 | @@ -366,12 +368,12 @@ void wm97xx_config_gpio(struct wm97xx *wm, u32 gpio, wm97xx_gpio_dir_t dir, | ||
67 | |||
68 | /* | ||
69 | * Handle a pen down interrupt. | ||
70 | - */ | ||
71 | -static void wm97xx_pen_irq_worker(void *ptr) | ||
72 | -{ | ||
73 | - struct wm97xx *wm = (struct wm97xx *) ptr; | ||
74 | - | ||
75 | - /* do we need to enable the touch panel reader */ | ||
76 | + */ | ||
77 | +static void wm97xx_pen_irq_worker(struct work_struct *work) | ||
78 | +{ | ||
79 | + struct wm97xx *wm = container_of(work, struct wm97xx, pen_event_work); | ||
80 | + | ||
81 | + /* do we need to enable the touch panel reader */ | ||
82 | if (wm->id == WM9705_ID2) { | ||
83 | if (wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD) & WM97XX_PEN_DOWN) | ||
84 | wm->pen_is_down = 1; | ||
85 | @@ -411,9 +413,8 @@ static void wm97xx_pen_irq_worker(void *ptr) | ||
86 | * We have to disable the codec interrupt in the handler because it can | ||
87 | * take upto 1ms to clear the interrupt source. The interrupt is then enabled | ||
88 | * again in the slow handler when the source has been cleared. | ||
89 | - */ | ||
90 | -static irqreturn_t wm97xx_pen_interrupt(int irq, void *dev_id, | ||
91 | - struct pt_regs *regs) | ||
92 | + */ | ||
93 | +static irqreturn_t wm97xx_pen_interrupt(int irq, void *dev_id) | ||
94 | { | ||
95 | struct wm97xx *wm = (struct wm97xx *) dev_id; | ||
96 | disable_irq(wm->pen_irq); | ||
97 | @@ -428,15 +429,15 @@ static int wm97xx_init_pen_irq(struct wm97xx *wm) | ||
98 | { | ||
99 | u16 reg; | ||
100 | |||
101 | - INIT_WORK(&wm->pen_event_work, wm97xx_pen_irq_worker, wm); | ||
102 | - if ((wm->pen_irq_workq = | ||
103 | + INIT_WORK(&wm->pen_event_work, wm97xx_pen_irq_worker); | ||
104 | + if ((wm->pen_irq_workq = | ||
105 | create_singlethread_workqueue("kwm97pen")) == NULL) { | ||
106 | err("could not create pen irq work queue"); | ||
107 | wm->pen_irq = 0; | ||
108 | return -EINVAL; | ||
109 | } | ||
110 | |||
111 | - if (request_irq (wm->pen_irq, wm97xx_pen_interrupt, SA_SHIRQ, "wm97xx-pen", wm)) { | ||
112 | + if (request_irq (wm->pen_irq, wm97xx_pen_interrupt, IRQF_SHARED, "wm97xx-pen", wm)) { | ||
113 | err("could not register codec pen down interrupt, will poll for pen down"); | ||
114 | destroy_workqueue(wm->pen_irq_workq); | ||
115 | wm->pen_irq = 0; | ||
116 | diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h | ||
117 | index b1c1740..a9bd57e 100644 | ||
118 | --- a/include/linux/wm97xx.h | ||
119 | +++ b/include/linux/wm97xx.h | ||
120 | @@ -243,7 +243,7 @@ struct wm97xx { | ||
121 | u16 dig_save[3]; /* saved during aux reading */ | ||
122 | struct wm97xx_codec_drv *codec; /* attached codec driver*/ | ||
123 | struct input_dev* input_dev; /* touchscreen input device */ | ||
124 | - ac97_t *ac97; /* ALSA codec access */ | ||
125 | + struct snd_ac97 *ac97; /* ALSA codec access */ | ||
126 | struct device *dev; /* ALSA device */ | ||
127 | struct device *battery_dev; | ||
128 | struct device *touch_dev; | ||