• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/input/keyboard/

Lines Matching refs:omap_kp

56 struct omap_kp {
73 static void set_col_gpio_val(struct omap_kp *omap_kp, u8 value)
77 for (col = 0; col < omap_kp->cols; col++)
81 static u8 get_row_gpio_val(struct omap_kp *omap_kp)
86 for (row = 0; row < omap_kp->rows; row++) {
99 struct omap_kp *omap_kp = dev_id;
105 for (i = 0; i < omap_kp->rows; i++) {
132 static void omap_kp_scan_keypad(struct omap_kp *omap_kp, unsigned char *state)
139 for (col = 0; col < omap_kp->cols; col++) {
140 set_col_gpio_val(omap_kp, ~(1 << col));
141 state[col] = ~(get_row_gpio_val(omap_kp)) & 0xff;
143 set_col_gpio_val(omap_kp, 0);
151 for (col = 0; col < omap_kp->cols; col++) {
155 udelay(omap_kp->delay);
178 struct omap_kp *omap_kp_data = (struct omap_kp *) data;
297 struct omap_kp *omap_kp;
307 omap_kp = kzalloc(sizeof(struct omap_kp), GFP_KERNEL);
309 if (!omap_kp || !input_dev) {
310 kfree(omap_kp);
315 platform_set_drvdata(pdev, omap_kp);
317 omap_kp->input = input_dev;
329 omap_kp->delay = pdata->delay;
336 omap_kp->rows = pdata->rows;
337 omap_kp->cols = pdata->cols;
341 for (col_idx = 0; col_idx < omap_kp->cols; col_idx++) {
351 for (row_idx = 0; row_idx < omap_kp->rows; row_idx++) {
365 setup_timer(&omap_kp->timer, omap_kp_timer, (unsigned long)omap_kp);
369 kp_tasklet.data = (unsigned long) omap_kp;
388 ret = input_register_device(omap_kp->input);
398 omap_kp_scan_keypad(omap_kp, keypad_state);
400 omap_kp->irq = platform_get_irq(pdev, 0);
401 if (omap_kp->irq >= 0) {
402 if (request_irq(omap_kp->irq, omap_kp_interrupt, 0,
403 "omap-keypad", omap_kp) < 0)
408 for (irq_idx = 0; irq_idx < omap_kp->rows; irq_idx++) {
412 "omap-keypad", omap_kp) < 0)
421 input_unregister_device(omap_kp->input);
432 kfree(omap_kp);
440 struct omap_kp *omap_kp = platform_get_drvdata(pdev);
446 for (i = 0; i < omap_kp->cols; i++)
448 for (i = 0; i < omap_kp->rows; i++) {
454 free_irq(omap_kp->irq, 0);
457 del_timer_sync(&omap_kp->timer);
461 input_unregister_device(omap_kp->input);
463 kfree(omap_kp);