20 #include <linux/module.h>
22 #include <linux/kernel.h>
31 #include <mach/hardware.h>
33 #include <mach/regs-ac97.h>
42 #define WM_READS(sp) ((sp / HZ) + 1)
57 static int cont_rate = 200;
68 MODULE_PARM_DESC(pressure,
"Pressure readback (1 = pressure, 0 = no pressure)");
75 static int ac97_touch_slot = 5;
81 static void wm97xx_acc_pen_up(
struct wm97xx *wm)
87 for (i = 0; i < 16; i++)
91 static int wm97xx_acc_pen_down(
struct wm97xx *wm)
122 dev_dbg(wm->
dev,
"Raw coordinates: x=%x, y=%x, p=%x\n",
139 }
while (reads < cinfo[sp_idx].reads);
144 static int wm97xx_acc_startup(
struct wm97xx *wm)
153 for (idx = 0; idx <
ARRAY_SIZE(cinfo); idx++) {
154 if (wm->
id != cinfo[idx].
id)
157 if (cont_rate <= cinfo[idx].
speed)
163 "zylonite accelerated touchscreen driver, %d samples/sec\n",
164 cinfo[sp_idx].
speed);
169 static void wm97xx_irq_enable(
struct wm97xx *wm,
int enable)
179 .acc_pen_up = wm97xx_acc_pen_up,
180 .acc_pen_down = wm97xx_acc_pen_down,
181 .acc_startup = wm97xx_acc_startup,
182 .irq_enable = wm97xx_irq_enable,
188 struct wm97xx *wm = platform_get_drvdata(pdev);
213 struct wm97xx *wm = platform_get_drvdata(pdev);
221 .probe = zylonite_wm97xx_probe,
222 .remove = zylonite_wm97xx_remove,
224 .name =
"wm97xx-touch",