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()
377 struct tc_keypad *keypad; in tc3589x_keypad_probe() local
392 keypad = devm_kzalloc(&pdev->dev, sizeof(struct tc_keypad), in tc3589x_keypad_probe()
394 if (!keypad) in tc3589x_keypad_probe()
403 keypad->board = plat; in tc3589x_keypad_probe()
404 keypad->input = input; in tc3589x_keypad_probe()
405 keypad->tc3589x = tc3589x; in tc3589x_keypad_probe()
422 keypad->keymap = input->keycode; in tc3589x_keypad_probe()
428 input_set_drvdata(input, keypad); in tc3589x_keypad_probe()
430 tc3589x_keypad_disable(keypad); in tc3589x_keypad_probe()
435 "tc3589x-keypad", keypad); in tc3589x_keypad_probe()
453 platform_set_drvdata(pdev, keypad); in tc3589x_keypad_probe()
462 struct tc_keypad *keypad = platform_get_drvdata(pdev); in tc3589x_keypad_suspend() local
466 if (keypad->keypad_stopped) in tc3589x_keypad_suspend()
471 tc3589x_keypad_disable(keypad); in tc3589x_keypad_suspend()
481 struct tc_keypad *keypad = platform_get_drvdata(pdev); in tc3589x_keypad_resume() local
484 if (!keypad->keypad_stopped) in tc3589x_keypad_resume()
489 tc3589x_keypad_enable(keypad); in tc3589x_keypad_resume()