• Home
  • Raw
  • Download

Lines Matching refs:keypad

115 static int stmpe_keypad_read_data(struct stmpe_keypad *keypad, u8 *data)  in stmpe_keypad_read_data()  argument
117 const struct stmpe_keypad_variant *variant = keypad->variant; in stmpe_keypad_read_data()
118 struct stmpe *stmpe = keypad->stmpe; in stmpe_keypad_read_data()
139 struct stmpe_keypad *keypad = dev; in stmpe_keypad_irq() local
140 struct input_dev *input = keypad->input; in stmpe_keypad_irq()
141 const struct stmpe_keypad_variant *variant = keypad->variant; in stmpe_keypad_irq()
146 ret = stmpe_keypad_read_data(keypad, fifo); in stmpe_keypad_irq()
162 input_report_key(input, keypad->keymap[code], !up); in stmpe_keypad_irq()
169 static int __devinit stmpe_keypad_altfunc_init(struct stmpe_keypad *keypad) in stmpe_keypad_altfunc_init() argument
171 const struct stmpe_keypad_variant *variant = keypad->variant; in stmpe_keypad_altfunc_init()
174 struct stmpe *stmpe = keypad->stmpe; in stmpe_keypad_altfunc_init()
192 if (keypad->cols & (1 << i)) in stmpe_keypad_altfunc_init()
201 if (keypad->rows & (1 << i)) in stmpe_keypad_altfunc_init()
210 static int __devinit stmpe_keypad_chip_init(struct stmpe_keypad *keypad) in stmpe_keypad_chip_init() argument
212 const struct stmpe_keypad_platform_data *plat = keypad->plat; in stmpe_keypad_chip_init()
213 const struct stmpe_keypad_variant *variant = keypad->variant; in stmpe_keypad_chip_init()
214 struct stmpe *stmpe = keypad->stmpe; in stmpe_keypad_chip_init()
227 ret = stmpe_keypad_altfunc_init(keypad); in stmpe_keypad_chip_init()
231 ret = stmpe_reg_write(stmpe, STMPE_KPC_COL, keypad->cols); in stmpe_keypad_chip_init()
235 ret = stmpe_reg_write(stmpe, STMPE_KPC_ROW_LSB, keypad->rows); in stmpe_keypad_chip_init()
242 keypad->rows >> 8); in stmpe_keypad_chip_init()
264 struct stmpe_keypad *keypad; in stmpe_keypad_probe() local
270 plat = stmpe->pdata->keypad; in stmpe_keypad_probe()
278 keypad = kzalloc(sizeof(struct stmpe_keypad), GFP_KERNEL); in stmpe_keypad_probe()
279 if (!keypad) in stmpe_keypad_probe()
298 input->keycode = keypad->keymap; in stmpe_keypad_probe()
299 input->keycodesize = sizeof(keypad->keymap[0]); in stmpe_keypad_probe()
300 input->keycodemax = ARRAY_SIZE(keypad->keymap); in stmpe_keypad_probe()
308 keypad->cols |= 1 << KEY_COL(key); in stmpe_keypad_probe()
309 keypad->rows |= 1 << KEY_ROW(key); in stmpe_keypad_probe()
312 keypad->stmpe = stmpe; in stmpe_keypad_probe()
313 keypad->plat = plat; in stmpe_keypad_probe()
314 keypad->input = input; in stmpe_keypad_probe()
315 keypad->variant = &stmpe_keypad_variants[stmpe->partnum]; in stmpe_keypad_probe()
317 ret = stmpe_keypad_chip_init(keypad); in stmpe_keypad_probe()
329 "stmpe-keypad", keypad); in stmpe_keypad_probe()
335 platform_set_drvdata(pdev, keypad); in stmpe_keypad_probe()
345 kfree(keypad); in stmpe_keypad_probe()
351 struct stmpe_keypad *keypad = platform_get_drvdata(pdev); in stmpe_keypad_remove() local
352 struct stmpe *stmpe = keypad->stmpe; in stmpe_keypad_remove()
357 free_irq(irq, keypad); in stmpe_keypad_remove()
358 input_unregister_device(keypad->input); in stmpe_keypad_remove()
360 kfree(keypad); in stmpe_keypad_remove()