Lines Matching refs:keypad

114 static int tc3589x_keypad_init_key_hardware(struct tc_keypad *keypad)  in tc3589x_keypad_init_key_hardware()  argument
117 struct tc3589x *tc3589x = keypad->tc3589x; in tc3589x_keypad_init_key_hardware()
118 const struct tc3589x_keypad_platform_data *board = keypad->board; in tc3589x_keypad_init_key_hardware()
191 struct tc_keypad *keypad = dev; in tc3589x_keypad_irq() local
192 struct tc3589x *tc3589x = keypad->tc3589x; in tc3589x_keypad_irq()
211 input_event(keypad->input, EV_MSC, MSC_SCAN, code); in tc3589x_keypad_irq()
212 input_report_key(keypad->input, keypad->keymap[code], !up); in tc3589x_keypad_irq()
213 input_sync(keypad->input); in tc3589x_keypad_irq()
226 static int tc3589x_keypad_enable(struct tc_keypad *keypad) in tc3589x_keypad_enable() argument
228 struct tc3589x *tc3589x = keypad->tc3589x; in tc3589x_keypad_enable()
257 keypad->keypad_stopped = false; in tc3589x_keypad_enable()
262 static int tc3589x_keypad_disable(struct tc_keypad *keypad) in tc3589x_keypad_disable() argument
264 struct tc3589x *tc3589x = keypad->tc3589x; in tc3589x_keypad_disable()
287 keypad->keypad_stopped = true; in tc3589x_keypad_disable()
295 struct tc_keypad *keypad = input_get_drvdata(input); in tc3589x_keypad_open() local
298 error = tc3589x_keypad_enable(keypad); in tc3589x_keypad_open()
304 error = tc3589x_keypad_init_key_hardware(keypad); in tc3589x_keypad_open()
315 struct tc_keypad *keypad = input_get_drvdata(input); in tc3589x_keypad_close() local
318 tc3589x_keypad_disable(keypad); in tc3589x_keypad_close()
374 struct tc_keypad *keypad; in tc3589x_keypad_probe() local
389 keypad = kzalloc(sizeof(struct tc_keypad), GFP_KERNEL); in tc3589x_keypad_probe()
391 if (!keypad || !input) { in tc3589x_keypad_probe()
397 keypad->board = plat; in tc3589x_keypad_probe()
398 keypad->input = input; in tc3589x_keypad_probe()
399 keypad->tc3589x = tc3589x; in tc3589x_keypad_probe()
416 keypad->keymap = input->keycode; in tc3589x_keypad_probe()
422 input_set_drvdata(input, keypad); in tc3589x_keypad_probe()
426 "tc3589x-keypad", keypad); in tc3589x_keypad_probe()
444 platform_set_drvdata(pdev, keypad); in tc3589x_keypad_probe()
449 free_irq(irq, keypad); in tc3589x_keypad_probe()
452 kfree(keypad); in tc3589x_keypad_probe()
458 struct tc_keypad *keypad = platform_get_drvdata(pdev); in tc3589x_keypad_remove() local
461 if (!keypad->keypad_stopped) in tc3589x_keypad_remove()
462 tc3589x_keypad_disable(keypad); in tc3589x_keypad_remove()
464 free_irq(irq, keypad); in tc3589x_keypad_remove()
466 input_unregister_device(keypad->input); in tc3589x_keypad_remove()
468 kfree(keypad); in tc3589x_keypad_remove()
477 struct tc_keypad *keypad = platform_get_drvdata(pdev); in tc3589x_keypad_suspend() local
481 if (keypad->keypad_stopped) in tc3589x_keypad_suspend()
486 tc3589x_keypad_disable(keypad); in tc3589x_keypad_suspend()
496 struct tc_keypad *keypad = platform_get_drvdata(pdev); in tc3589x_keypad_resume() local
499 if (!keypad->keypad_stopped) in tc3589x_keypad_resume()
504 tc3589x_keypad_enable(keypad); in tc3589x_keypad_resume()