Lines Matching +full:up +full:- +full:samples

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * mainstone-wm97xx.c -- Mainstone Continuous Touch screen driver for
16 * - codecs supported:- WM9705, WM9712, WM9713
17 * - processors supported:- Intel XScale PXA25x, PXA26x, PXA27x
31 #include <sound/pxa2xx-lib.h>
33 #include <asm/mach-types.h>
122 * to buffer up samples otherwise we end up spinning polling in wm97xx_acc_pen_down()
123 * for samples. The controller can't have a suitably low in wm97xx_acc_pen_down()
146 dev_dbg(wm->dev, "Raw coordinates: x=%x, y=%x, p=%x\n", in wm97xx_acc_pen_down()
149 /* are samples valid */ in wm97xx_acc_pen_down()
153 goto up; in wm97xx_acc_pen_down()
157 input_report_abs(wm->input_dev, ABS_X, x & 0xfff); in wm97xx_acc_pen_down()
158 input_report_abs(wm->input_dev, ABS_Y, y & 0xfff); in wm97xx_acc_pen_down()
159 input_report_abs(wm->input_dev, ABS_PRESSURE, p & 0xfff); in wm97xx_acc_pen_down()
160 input_report_key(wm->input_dev, BTN_TOUCH, (p != 0)); in wm97xx_acc_pen_down()
161 input_sync(wm->input_dev); in wm97xx_acc_pen_down()
164 up: in wm97xx_acc_pen_down()
173 if (wm->ac97 == NULL) in wm97xx_acc_startup()
174 return -ENODEV; in wm97xx_acc_startup()
178 if (wm->id != cinfo[idx].id) in wm97xx_acc_startup()
184 wm->acc_rate = cinfo[sp_idx].code; in wm97xx_acc_startup()
185 wm->acc_slot = ac97_touch_slot; in wm97xx_acc_startup()
186 dev_info(wm->dev, in wm97xx_acc_startup()
187 "mainstone accelerated touchscreen driver, %d samples/sec\n", in wm97xx_acc_startup()
191 gpiod_irq = gpiod_get(wm->dev, "touch", GPIOD_IN); in wm97xx_acc_startup()
197 wm->pen_irq = gpiod_to_irq(gpiod_irq); in wm97xx_acc_startup()
198 irq_set_irq_type(wm->pen_irq, IRQ_TYPE_EDGE_BOTH); in wm97xx_acc_startup()
203 switch (wm->id) { in wm97xx_acc_startup()
219 dev_err(wm->dev, in wm97xx_acc_startup()
235 wm->pen_irq = 0; in wm97xx_acc_shutdown()
266 .name = "wm97xx-touch",