• Home
  • Raw
  • Download

Lines Matching refs:keypad

95 static int tc3589x_keypad_init_key_hardware(struct tc_keypad *keypad)  in tc3589x_keypad_init_key_hardware()  argument
98 struct tc3589x *tc3589x = keypad->tc3589x; in tc3589x_keypad_init_key_hardware()
99 u8 settle_time = keypad->board->settle_time; in tc3589x_keypad_init_key_hardware()
100 u8 dbounce_period = keypad->board->debounce_period; in tc3589x_keypad_init_key_hardware()
101 u8 rows = keypad->board->krow & 0xf; /* mask out the nibble */ in tc3589x_keypad_init_key_hardware()
102 u8 column = keypad->board->kcol & 0xf; /* mask out the nibble */ in tc3589x_keypad_init_key_hardware()
105 if (keypad->board->kcol > TC3589x_MAX_KPCOL || in tc3589x_keypad_init_key_hardware()
106 keypad->board->krow > TC3589x_MAX_KPROW || in tc3589x_keypad_init_key_hardware()
107 keypad->board->debounce_period > TC3589x_MAX_DEBOUNCE_SETTLE || in tc3589x_keypad_init_key_hardware()
108 keypad->board->settle_time > TC3589x_MAX_DEBOUNCE_SETTLE) in tc3589x_keypad_init_key_hardware()
176 struct tc_keypad *keypad = dev; in tc3589x_keypad_irq() local
177 struct tc3589x *tc3589x = keypad->tc3589x; in tc3589x_keypad_irq()
196 input_event(keypad->input, EV_MSC, MSC_SCAN, code); in tc3589x_keypad_irq()
197 input_report_key(keypad->input, keypad->keymap[code], !up); in tc3589x_keypad_irq()
198 input_sync(keypad->input); in tc3589x_keypad_irq()
211 static int tc3589x_keypad_enable(struct tc_keypad *keypad) in tc3589x_keypad_enable() argument
213 struct tc3589x *tc3589x = keypad->tc3589x; in tc3589x_keypad_enable()
242 keypad->keypad_stopped = false; in tc3589x_keypad_enable()
247 static int tc3589x_keypad_disable(struct tc_keypad *keypad) in tc3589x_keypad_disable() argument
249 struct tc3589x *tc3589x = keypad->tc3589x; in tc3589x_keypad_disable()
272 keypad->keypad_stopped = true; in tc3589x_keypad_disable()
280 struct tc_keypad *keypad = input_get_drvdata(input); in tc3589x_keypad_open() local
283 error = tc3589x_keypad_enable(keypad); in tc3589x_keypad_open()
289 error = tc3589x_keypad_init_key_hardware(keypad); in tc3589x_keypad_open()
300 struct tc_keypad *keypad = input_get_drvdata(input); in tc3589x_keypad_close() local
303 tc3589x_keypad_disable(keypad); in tc3589x_keypad_close()
309 struct tc_keypad *keypad; in tc3589x_keypad_probe() local
314 plat = tc3589x->pdata->keypad; in tc3589x_keypad_probe()
324 keypad = kzalloc(sizeof(struct tc_keypad), GFP_KERNEL); in tc3589x_keypad_probe()
326 if (!keypad || !input) { in tc3589x_keypad_probe()
332 keypad->board = plat; in tc3589x_keypad_probe()
333 keypad->input = input; in tc3589x_keypad_probe()
334 keypad->tc3589x = tc3589x; in tc3589x_keypad_probe()
340 input->keycode = keypad->keymap; in tc3589x_keypad_probe()
341 input->keycodesize = sizeof(keypad->keymap[0]); in tc3589x_keypad_probe()
342 input->keycodemax = ARRAY_SIZE(keypad->keymap); in tc3589x_keypad_probe()
347 input_set_drvdata(input, keypad); in tc3589x_keypad_probe()
360 "tc3589x-keypad", keypad); in tc3589x_keypad_probe()
378 platform_set_drvdata(pdev, keypad); in tc3589x_keypad_probe()
383 free_irq(irq, keypad); in tc3589x_keypad_probe()
386 kfree(keypad); in tc3589x_keypad_probe()
392 struct tc_keypad *keypad = platform_get_drvdata(pdev); in tc3589x_keypad_remove() local
395 if (!keypad->keypad_stopped) in tc3589x_keypad_remove()
396 tc3589x_keypad_disable(keypad); in tc3589x_keypad_remove()
398 free_irq(irq, keypad); in tc3589x_keypad_remove()
400 input_unregister_device(keypad->input); in tc3589x_keypad_remove()
402 kfree(keypad); in tc3589x_keypad_remove()
411 struct tc_keypad *keypad = platform_get_drvdata(pdev); in tc3589x_keypad_suspend() local
415 if (keypad->keypad_stopped) in tc3589x_keypad_suspend()
420 tc3589x_keypad_disable(keypad); in tc3589x_keypad_suspend()
430 struct tc_keypad *keypad = platform_get_drvdata(pdev); in tc3589x_keypad_resume() local
433 if (!keypad->keypad_stopped) in tc3589x_keypad_resume()
438 tc3589x_keypad_enable(keypad); in tc3589x_keypad_resume()