Lines Matching refs:atmel_wm97xx
137 struct atmel_wm97xx { struct
150 struct atmel_wm97xx *atmel_wm97xx = dev_id; in atmel_wm97xx_channel_b_interrupt() argument
151 struct wm97xx *wm = atmel_wm97xx->wm; in atmel_wm97xx_channel_b_interrupt()
152 int status = ac97c_readl(atmel_wm97xx, CBSR); in atmel_wm97xx_channel_b_interrupt()
157 ac97c_readl(atmel_wm97xx, CBRHR); in atmel_wm97xx_channel_b_interrupt()
165 data = ac97c_readl(atmel_wm97xx, CBRHR); in atmel_wm97xx_channel_b_interrupt()
171 atmel_wm97xx->x = value; in atmel_wm97xx_channel_b_interrupt()
173 atmel_wm97xx->y = value; in atmel_wm97xx_channel_b_interrupt()
176 input_report_abs(wm->input_dev, ABS_X, atmel_wm97xx->x); in atmel_wm97xx_channel_b_interrupt()
177 input_report_abs(wm->input_dev, ABS_Y, atmel_wm97xx->y); in atmel_wm97xx_channel_b_interrupt()
181 input_report_abs(wm->input_dev, ABS_X, atmel_wm97xx->x); in atmel_wm97xx_channel_b_interrupt()
182 input_report_abs(wm->input_dev, ABS_Y, atmel_wm97xx->y); in atmel_wm97xx_channel_b_interrupt()
196 struct atmel_wm97xx *atmel_wm97xx = platform_get_drvdata(wm->touch_dev); in atmel_wm97xx_acc_pen_up() local
198 int pen_down = gpio_get_value(atmel_wm97xx->gpio_pen); in atmel_wm97xx_acc_pen_up()
201 mod_timer(&atmel_wm97xx->pen_timer, in atmel_wm97xx_acc_pen_up()
218 struct atmel_wm97xx *atmel_wm97xx = platform_get_drvdata(wm->touch_dev); in atmel_wm97xx_acc_startup() local
242 wm->pen_irq = atmel_wm97xx->gpio_irq; in atmel_wm97xx_acc_startup()
263 reg = ac97c_readl(atmel_wm97xx, ICA); in atmel_wm97xx_acc_startup()
266 ac97c_writel(atmel_wm97xx, ICA, reg); in atmel_wm97xx_acc_startup()
271 ac97c_writel(atmel_wm97xx, CBMR, AC97C_CMR_CENA in atmel_wm97xx_acc_startup()
277 ac97c_readl(atmel_wm97xx, CBRHR); in atmel_wm97xx_acc_startup()
282 ac97c_writel(atmel_wm97xx, IER, AC97C_INT_CBEVT); in atmel_wm97xx_acc_startup()
298 struct atmel_wm97xx *atmel_wm97xx = in atmel_wm97xx_acc_shutdown() local
307 ica = ac97c_readl(atmel_wm97xx, ICA); in atmel_wm97xx_acc_shutdown()
309 ac97c_writel(atmel_wm97xx, ICA, ica); in atmel_wm97xx_acc_shutdown()
310 ac97c_writel(atmel_wm97xx, IDR, AC97C_INT_CBEVT); in atmel_wm97xx_acc_shutdown()
311 ac97c_writel(atmel_wm97xx, CBMR, 0); in atmel_wm97xx_acc_shutdown()
338 struct atmel_wm97xx *atmel_wm97xx; in atmel_wm97xx_probe() local
341 atmel_wm97xx = kzalloc(sizeof(struct atmel_wm97xx), GFP_KERNEL); in atmel_wm97xx_probe()
342 if (!atmel_wm97xx) { in atmel_wm97xx_probe()
347 atmel_wm97xx->wm = wm; in atmel_wm97xx_probe()
348 atmel_wm97xx->regs = (void *)ATMEL_WM97XX_AC97C_IOMEM; in atmel_wm97xx_probe()
349 atmel_wm97xx->ac97c_irq = ATMEL_WM97XX_AC97C_IRQ; in atmel_wm97xx_probe()
350 atmel_wm97xx->gpio_pen = atmel_gpio_line; in atmel_wm97xx_probe()
351 atmel_wm97xx->gpio_irq = gpio_to_irq(atmel_wm97xx->gpio_pen); in atmel_wm97xx_probe()
353 setup_timer(&atmel_wm97xx->pen_timer, atmel_wm97xx_pen_timer, in atmel_wm97xx_probe()
356 ret = request_irq(atmel_wm97xx->ac97c_irq, in atmel_wm97xx_probe()
358 IRQF_SHARED, "atmel-wm97xx-ch-b", atmel_wm97xx); in atmel_wm97xx_probe()
364 platform_set_drvdata(pdev, atmel_wm97xx); in atmel_wm97xx_probe()
373 free_irq(atmel_wm97xx->ac97c_irq, atmel_wm97xx); in atmel_wm97xx_probe()
376 kfree(atmel_wm97xx); in atmel_wm97xx_probe()
382 struct atmel_wm97xx *atmel_wm97xx = platform_get_drvdata(pdev); in atmel_wm97xx_remove() local
383 struct wm97xx *wm = atmel_wm97xx->wm; in atmel_wm97xx_remove()
385 ac97c_writel(atmel_wm97xx, IDR, AC97C_INT_CBEVT); in atmel_wm97xx_remove()
386 free_irq(atmel_wm97xx->ac97c_irq, atmel_wm97xx); in atmel_wm97xx_remove()
387 del_timer_sync(&atmel_wm97xx->pen_timer); in atmel_wm97xx_remove()
390 kfree(atmel_wm97xx); in atmel_wm97xx_remove()
399 struct atmel_wm97xx *atmel_wm97xx = platform_get_drvdata(pdev); in atmel_wm97xx_suspend() local
401 ac97c_writel(atmel_wm97xx, IDR, AC97C_INT_CBEVT); in atmel_wm97xx_suspend()
402 disable_irq(atmel_wm97xx->gpio_irq); in atmel_wm97xx_suspend()
403 del_timer_sync(&atmel_wm97xx->pen_timer); in atmel_wm97xx_suspend()
411 struct atmel_wm97xx *atmel_wm97xx = platform_get_drvdata(pdev); in atmel_wm97xx_resume() local
412 struct wm97xx *wm = atmel_wm97xx->wm; in atmel_wm97xx_resume()
415 enable_irq(atmel_wm97xx->gpio_irq); in atmel_wm97xx_resume()
416 ac97c_writel(atmel_wm97xx, IER, AC97C_INT_CBEVT); in atmel_wm97xx_resume()