Lines Matching refs:wm
101 static void wm97xx_acc_pen_up(struct wm97xx *wm) in wm97xx_acc_pen_up() argument
109 static void wm97xx_acc_pen_up(struct wm97xx *wm) in wm97xx_acc_pen_up() argument
120 static int wm97xx_acc_pen_down(struct wm97xx *wm) in wm97xx_acc_pen_down() argument
150 dev_dbg(wm->dev, "Raw coordinates: x=%x, y=%x, p=%x\n", in wm97xx_acc_pen_down()
161 input_report_abs(wm->input_dev, ABS_X, x & 0xfff); in wm97xx_acc_pen_down()
162 input_report_abs(wm->input_dev, ABS_Y, y & 0xfff); in wm97xx_acc_pen_down()
163 input_report_abs(wm->input_dev, ABS_PRESSURE, p & 0xfff); in wm97xx_acc_pen_down()
164 input_report_key(wm->input_dev, BTN_TOUCH, (p != 0)); in wm97xx_acc_pen_down()
165 input_sync(wm->input_dev); in wm97xx_acc_pen_down()
172 static int wm97xx_acc_startup(struct wm97xx *wm) in wm97xx_acc_startup() argument
177 if (wm->ac97 == NULL) in wm97xx_acc_startup()
182 if (wm->id != cinfo[idx].id) in wm97xx_acc_startup()
188 wm->acc_rate = cinfo[sp_idx].code; in wm97xx_acc_startup()
189 wm->acc_slot = ac97_touch_slot; in wm97xx_acc_startup()
190 dev_info(wm->dev, in wm97xx_acc_startup()
200 wm->variant = WM97xx_WM1613; in wm97xx_acc_startup()
215 wm->pen_irq = gpio_to_irq(irq); in wm97xx_acc_startup()
216 irq_set_irq_type(wm->pen_irq, IRQ_TYPE_EDGE_BOTH); in wm97xx_acc_startup()
222 switch (wm->id) { in wm97xx_acc_startup()
228 wm97xx_config_gpio(wm, WM97XX_GPIO_13, WM97XX_GPIO_IN, in wm97xx_acc_startup()
232 wm97xx_config_gpio(wm, WM97XX_GPIO_2, WM97XX_GPIO_OUT, in wm97xx_acc_startup()
238 dev_err(wm->dev, in wm97xx_acc_startup()
249 static void wm97xx_acc_shutdown(struct wm97xx *wm) in wm97xx_acc_shutdown() argument
255 wm->pen_irq = 0; in wm97xx_acc_shutdown()
259 static void wm97xx_irq_enable(struct wm97xx *wm, int enable) in wm97xx_irq_enable() argument
262 enable_irq(wm->pen_irq); in wm97xx_irq_enable()
264 disable_irq_nosync(wm->pen_irq); in wm97xx_irq_enable()
279 struct wm97xx *wm = platform_get_drvdata(pdev); in mainstone_wm97xx_probe() local
281 return wm97xx_register_mach_ops(wm, &mainstone_mach_ops); in mainstone_wm97xx_probe()
286 struct wm97xx *wm = platform_get_drvdata(pdev); in mainstone_wm97xx_remove() local
288 wm97xx_unregister_mach_ops(wm); in mainstone_wm97xx_remove()