Lines Matching refs:omap_kp
38 struct omap_kp { struct
66 static void omap_kp_scan_keypad(struct omap_kp *omap_kp, unsigned char *state) in omap_kp_scan_keypad() argument
75 for (col = 0; col < omap_kp->cols; col++) { in omap_kp_scan_keypad()
79 udelay(omap_kp->delay); in omap_kp_scan_keypad()
90 struct omap_kp *omap_kp_data = (struct omap_kp *) data; in omap_kp_tasklet()
150 struct omap_kp *omap_kp = dev_get_drvdata(dev); in omap_kp_enable_store() local
162 enable_irq(omap_kp->irq); in omap_kp_enable_store()
164 disable_irq(omap_kp->irq); in omap_kp_enable_store()
178 ATTRIBUTE_GROUPS(omap_kp);
182 struct omap_kp *omap_kp; in omap_kp_probe() local
196 omap_kp = kzalloc(struct_size(omap_kp, keymap, keycodemax), GFP_KERNEL); in omap_kp_probe()
198 if (!omap_kp || !input_dev) { in omap_kp_probe()
199 kfree(omap_kp); in omap_kp_probe()
204 platform_set_drvdata(pdev, omap_kp); in omap_kp_probe()
206 omap_kp->input = input_dev; in omap_kp_probe()
212 omap_kp->delay = pdata->delay; in omap_kp_probe()
214 omap_kp->rows = pdata->rows; in omap_kp_probe()
215 omap_kp->cols = pdata->cols; in omap_kp_probe()
217 timer_setup(&omap_kp->timer, omap_kp_timer, 0); in omap_kp_probe()
220 kp_tasklet.data = (unsigned long) omap_kp; in omap_kp_probe()
238 omap_kp->keymap, input_dev); in omap_kp_probe()
242 ret = input_register_device(omap_kp->input); in omap_kp_probe()
252 omap_kp_scan_keypad(omap_kp, keypad_state); in omap_kp_probe()
253 omap_kp->irq = platform_get_irq(pdev, 0); in omap_kp_probe()
254 if (omap_kp->irq >= 0) { in omap_kp_probe()
255 if (request_irq(omap_kp->irq, omap_kp_interrupt, 0, in omap_kp_probe()
256 "omap-keypad", omap_kp) < 0) in omap_kp_probe()
264 input_unregister_device(omap_kp->input); in omap_kp_probe()
267 kfree(omap_kp); in omap_kp_probe()
275 struct omap_kp *omap_kp = platform_get_drvdata(pdev); in omap_kp_remove() local
280 free_irq(omap_kp->irq, omap_kp); in omap_kp_remove()
282 timer_shutdown_sync(&omap_kp->timer); in omap_kp_remove()
286 input_unregister_device(omap_kp->input); in omap_kp_remove()
288 kfree(omap_kp); in omap_kp_remove()