Lines Matching full:keypad
43 struct st_keyscan *keypad = dev_id; in keyscan_isr() local
44 unsigned short *keycode = keypad->input_dev->keycode; in keyscan_isr()
48 state = readl(keypad->base + KEYSCAN_MATRIX_STATE_OFF) & 0xffff; in keyscan_isr()
49 change = keypad->last_state ^ state; in keyscan_isr()
50 keypad->last_state = state; in keyscan_isr()
53 input_report_key(keypad->input_dev, in keyscan_isr()
56 input_sync(keypad->input_dev); in keyscan_isr()
61 static int keyscan_start(struct st_keyscan *keypad) in keyscan_start() argument
65 error = clk_enable(keypad->clk); in keyscan_start()
69 writel(keypad->debounce_us * (clk_get_rate(keypad->clk) / 1000000), in keyscan_start()
70 keypad->base + KEYSCAN_DEBOUNCE_TIME_OFF); in keyscan_start()
72 writel(((keypad->n_cols - 1) << KEYSCAN_MATRIX_DIM_X_SHIFT) | in keyscan_start()
73 ((keypad->n_rows - 1) << KEYSCAN_MATRIX_DIM_Y_SHIFT), in keyscan_start()
74 keypad->base + KEYSCAN_MATRIX_DIM_OFF); in keyscan_start()
76 writel(KEYSCAN_CONFIG_ENABLE, keypad->base + KEYSCAN_CONFIG_OFF); in keyscan_start()
81 static void keyscan_stop(struct st_keyscan *keypad) in keyscan_stop() argument
83 writel(0, keypad->base + KEYSCAN_CONFIG_OFF); in keyscan_stop()
85 clk_disable(keypad->clk); in keyscan_stop()
90 struct st_keyscan *keypad = input_get_drvdata(dev); in keyscan_open() local
92 return keyscan_start(keypad); in keyscan_open()
97 struct st_keyscan *keypad = input_get_drvdata(dev); in keyscan_close() local
99 keyscan_stop(keypad); in keyscan_close()
111 dev_err(dev, "failed to parse keypad params\n"); in keypad_matrix_key_parse_dt()
216 struct st_keyscan *keypad = platform_get_drvdata(pdev); in keyscan_suspend() local
217 struct input_dev *input = keypad->input_dev; in keyscan_suspend()
222 enable_irq_wake(keypad->irq); in keyscan_suspend()
224 keyscan_stop(keypad); in keyscan_suspend()
233 struct st_keyscan *keypad = platform_get_drvdata(pdev); in keyscan_resume() local
234 struct input_dev *input = keypad->input_dev; in keyscan_resume()
240 disable_irq_wake(keypad->irq); in keyscan_resume()
242 retval = keyscan_start(keypad); in keyscan_resume()