diff options
Diffstat (limited to 'packages/linux/linux-rp-2.6.23/wm97xx-lg13-r0-fix-r0.patch')
-rw-r--r-- | packages/linux/linux-rp-2.6.23/wm97xx-lg13-r0-fix-r0.patch | 256 |
1 files changed, 256 insertions, 0 deletions
diff --git a/packages/linux/linux-rp-2.6.23/wm97xx-lg13-r0-fix-r0.patch b/packages/linux/linux-rp-2.6.23/wm97xx-lg13-r0-fix-r0.patch new file mode 100644 index 0000000000..f246fbfed5 --- /dev/null +++ b/packages/linux/linux-rp-2.6.23/wm97xx-lg13-r0-fix-r0.patch @@ -0,0 +1,256 @@ + 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; + 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; |