--- /dev/null
+++ b/drivers/input/touchscreen/at32-wm97xx.c
+static void at32_wm97xx_pen_timer(unsigned long data)
+{
+ struct at32_wm97xx *at32_wm97xx = (struct at32_wm97xx *)data;
+ struct wm97xx *wm = at32_wm97xx->wm;
+ int pen_down = gpio_get_value(at32_wm97xx->gpio_pen);
+
+ if (pen_down != 0) {
+ mod_timer(&at32_wm97xx->pen_timer, jiffies
+ + msecs_to_jiffies(1));
+ } else {
+ input_report_abs(wm->input_dev, ABS_PRESSURE, 0);
+ input_sync(wm->input_dev);
+ }
+}
+static int __init at32_wm97xx_probe(struct platform_device *pdev)[...]
+{
+ at32_wm97xx->regs = (void *)AT32_WM97XX_AC97C_IOMEM;
+ ret = request_irq(at32_wm97xx->ac97c_irq,[...]
+ at32_wm97xx_channel_b_interrupt,
+ IRQF_SHARED, "at32-wm97xx-ch-b", at32_wm97xx);
+ return wm97xx_register_mach_ops(wm,&at32_mach_ops);
+#ifdef CONFIG_PM
+static int at32_wm97xx_suspend(struct platform_device *pdev, pm_message_t msg)
+{
+ struct at32_wm97xx *at32_wm97xx = platform_get_drvdata(pdev);
+
+ ac97c_writel(at32_wm97xx, IDR, AC97C_INT_CBEVT);
+ disable_irq(at32_wm97xx->gpio_irq);