Lines Matching full:keypad
41 struct st_keyscan *keypad = dev_id; in keyscan_isr() local
42 unsigned short *keycode = keypad->input_dev->keycode; in keyscan_isr()
46 state = readl(keypad->base + KEYSCAN_MATRIX_STATE_OFF) & 0xffff; in keyscan_isr()
47 change = keypad->last_state ^ state; in keyscan_isr()
48 keypad->last_state = state; in keyscan_isr()
51 input_report_key(keypad->input_dev, in keyscan_isr()
54 input_sync(keypad->input_dev); in keyscan_isr()
59 static int keyscan_start(struct st_keyscan *keypad) in keyscan_start() argument
63 error = clk_enable(keypad->clk); in keyscan_start()
67 writel(keypad->debounce_us * (clk_get_rate(keypad->clk) / 1000000), in keyscan_start()
68 keypad->base + KEYSCAN_DEBOUNCE_TIME_OFF); in keyscan_start()
70 writel(((keypad->n_cols - 1) << KEYSCAN_MATRIX_DIM_X_SHIFT) | in keyscan_start()
71 ((keypad->n_rows - 1) << KEYSCAN_MATRIX_DIM_Y_SHIFT), in keyscan_start()
72 keypad->base + KEYSCAN_MATRIX_DIM_OFF); in keyscan_start()
74 writel(KEYSCAN_CONFIG_ENABLE, keypad->base + KEYSCAN_CONFIG_OFF); in keyscan_start()
79 static void keyscan_stop(struct st_keyscan *keypad) in keyscan_stop() argument
81 writel(0, keypad->base + KEYSCAN_CONFIG_OFF); in keyscan_stop()
83 clk_disable(keypad->clk); in keyscan_stop()
88 struct st_keyscan *keypad = input_get_drvdata(dev); in keyscan_open() local
90 return keyscan_start(keypad); in keyscan_open()
95 struct st_keyscan *keypad = input_get_drvdata(dev); in keyscan_close() local
97 keyscan_stop(keypad); in keyscan_close()
109 dev_err(dev, "failed to parse keypad params\n"); in keypad_matrix_key_parse_dt()
217 struct st_keyscan *keypad = platform_get_drvdata(pdev); in keyscan_suspend() local
218 struct input_dev *input = keypad->input_dev; in keyscan_suspend()
223 enable_irq_wake(keypad->irq); in keyscan_suspend()
225 keyscan_stop(keypad); in keyscan_suspend()
234 struct st_keyscan *keypad = platform_get_drvdata(pdev); in keyscan_resume() local
235 struct input_dev *input = keypad->input_dev; in keyscan_resume()
241 disable_irq_wake(keypad->irq); in keyscan_resume()
243 retval = keyscan_start(keypad); in keyscan_resume()