Searched refs:bf54x_kpad (Results 1 - 1 of 1) sorted by relevance
/linux-4.4.14/drivers/input/keyboard/ |
H A D | bf54x-keys.c | 77 struct bf54x_kpad { struct 89 static inline int bfin_kpad_find_key(struct bf54x_kpad *bf54x_kpad, bfin_kpad_find_key() argument 95 if (bf54x_kpad->keycode[i + input->keycodemax] == keyident) bfin_kpad_find_key() 96 return bf54x_kpad->keycode[i]; bfin_kpad_find_key() 119 static inline u16 bfin_kpad_get_keypressed(struct bf54x_kpad *bf54x_kpad) bfin_kpad_get_keypressed() argument 133 struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); bfin_kpad_timer() local 135 if (bfin_kpad_get_keypressed(bf54x_kpad)) { bfin_kpad_timer() 137 mod_timer(&bf54x_kpad->timer, bfin_kpad_timer() 138 jiffies + bf54x_kpad->keyup_test_jiffies); bfin_kpad_timer() 142 input_report_key(bf54x_kpad->input, bf54x_kpad->lastkey, 0); bfin_kpad_timer() 143 input_sync(bf54x_kpad->input); bfin_kpad_timer() 148 enable_irq(bf54x_kpad->irq); bfin_kpad_timer() 154 struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); bfin_kpad_isr() local 155 struct input_dev *input = bf54x_kpad->input; bfin_kpad_isr() 159 key = bfin_kpad_find_key(bf54x_kpad, input, rowcol); bfin_kpad_isr() 164 if (bfin_kpad_get_keypressed(bf54x_kpad)) { bfin_kpad_isr() 165 disable_irq_nosync(bf54x_kpad->irq); bfin_kpad_isr() 166 bf54x_kpad->lastkey = key; bfin_kpad_isr() 167 mod_timer(&bf54x_kpad->timer, bfin_kpad_isr() 168 jiffies + bf54x_kpad->keyup_test_jiffies); bfin_kpad_isr() 181 struct bf54x_kpad *bf54x_kpad; bfin_kpad_probe() local 197 bf54x_kpad = kzalloc(sizeof(struct bf54x_kpad), GFP_KERNEL); bfin_kpad_probe() 198 if (!bf54x_kpad) bfin_kpad_probe() 201 platform_set_drvdata(pdev, bf54x_kpad); bfin_kpad_probe() 204 bf54x_kpad->keycode = kmalloc(pdata->keymapsize * bfin_kpad_probe() 206 if (!bf54x_kpad->keycode) { bfin_kpad_probe() 226 bf54x_kpad->keyup_test_jiffies = msecs_to_jiffies(50); bfin_kpad_probe() 228 bf54x_kpad->keyup_test_jiffies = bfin_kpad_probe() 245 bf54x_kpad->irq = platform_get_irq(pdev, 0); bfin_kpad_probe() 246 if (bf54x_kpad->irq < 0) { bfin_kpad_probe() 251 error = request_irq(bf54x_kpad->irq, bfin_kpad_isr, bfin_kpad_probe() 255 bf54x_kpad->irq); bfin_kpad_probe() 265 bf54x_kpad->input = input; bfin_kpad_probe() 271 input_set_drvdata(input, bf54x_kpad); bfin_kpad_probe() 280 input->keycode = bf54x_kpad->keycode; bfin_kpad_probe() 282 bfin_keycodecpy(bf54x_kpad->keycode, pdata->keymap, pdata->keymapsize); bfin_kpad_probe() 291 if (bf54x_kpad->keycode[i] <= KEY_MAX) bfin_kpad_probe() 292 __set_bit(bf54x_kpad->keycode[i], input->keybit); bfin_kpad_probe() 303 setup_timer(&bf54x_kpad->timer, bfin_kpad_timer, (unsigned long) pdev); bfin_kpad_probe() 320 free_irq(bf54x_kpad->irq, pdev); bfin_kpad_probe() 326 kfree(bf54x_kpad->keycode); bfin_kpad_probe() 328 kfree(bf54x_kpad); bfin_kpad_probe() 336 struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); bfin_kpad_remove() local 338 del_timer_sync(&bf54x_kpad->timer); bfin_kpad_remove() 339 free_irq(bf54x_kpad->irq, pdev); bfin_kpad_remove() 341 input_unregister_device(bf54x_kpad->input); bfin_kpad_remove() 346 kfree(bf54x_kpad->keycode); bfin_kpad_remove() 347 kfree(bf54x_kpad); bfin_kpad_remove() 355 struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); bfin_kpad_suspend() local 357 bf54x_kpad->kpad_msel = bfin_read_KPAD_MSEL(); bfin_kpad_suspend() 358 bf54x_kpad->kpad_prescale = bfin_read_KPAD_PRESCALE(); bfin_kpad_suspend() 359 bf54x_kpad->kpad_ctl = bfin_read_KPAD_CTL(); bfin_kpad_suspend() 362 enable_irq_wake(bf54x_kpad->irq); bfin_kpad_suspend() 369 struct bf54x_kpad *bf54x_kpad = platform_get_drvdata(pdev); bfin_kpad_resume() local 371 bfin_write_KPAD_MSEL(bf54x_kpad->kpad_msel); bfin_kpad_resume() 372 bfin_write_KPAD_PRESCALE(bf54x_kpad->kpad_prescale); bfin_kpad_resume() 373 bfin_write_KPAD_CTL(bf54x_kpad->kpad_ctl); bfin_kpad_resume() 376 disable_irq_wake(bf54x_kpad->irq); bfin_kpad_resume()
|
Completed in 58 milliseconds