Lines Matching refs:keypad_data

102 static int keypad_matrix_key_parse_dt(struct st_keyscan *keypad_data)  in keypad_matrix_key_parse_dt()  argument
104 struct device *dev = keypad_data->input_dev->dev.parent; in keypad_matrix_key_parse_dt()
108 error = matrix_keypad_parse_properties(dev, &keypad_data->n_rows, in keypad_matrix_key_parse_dt()
109 &keypad_data->n_cols); in keypad_matrix_key_parse_dt()
115 of_property_read_u32(np, "st,debounce-us", &keypad_data->debounce_us); in keypad_matrix_key_parse_dt()
118 keypad_data->n_rows, keypad_data->n_cols, in keypad_matrix_key_parse_dt()
119 keypad_data->debounce_us); in keypad_matrix_key_parse_dt()
126 struct st_keyscan *keypad_data; in keyscan_probe() local
135 keypad_data = devm_kzalloc(&pdev->dev, sizeof(*keypad_data), in keyscan_probe()
137 if (!keypad_data) in keyscan_probe()
154 keypad_data->input_dev = input_dev; in keyscan_probe()
156 error = keypad_matrix_key_parse_dt(keypad_data); in keyscan_probe()
161 keypad_data->n_rows, in keyscan_probe()
162 keypad_data->n_cols, in keyscan_probe()
169 input_set_drvdata(input_dev, keypad_data); in keyscan_probe()
171 keypad_data->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); in keyscan_probe()
172 if (IS_ERR(keypad_data->base)) in keyscan_probe()
173 return PTR_ERR(keypad_data->base); in keyscan_probe()
175 keypad_data->clk = devm_clk_get(&pdev->dev, NULL); in keyscan_probe()
176 if (IS_ERR(keypad_data->clk)) { in keyscan_probe()
178 return PTR_ERR(keypad_data->clk); in keyscan_probe()
181 error = clk_enable(keypad_data->clk); in keyscan_probe()
187 keyscan_stop(keypad_data); in keyscan_probe()
189 keypad_data->irq = platform_get_irq(pdev, 0); in keyscan_probe()
190 if (keypad_data->irq < 0) in keyscan_probe()
193 error = devm_request_irq(&pdev->dev, keypad_data->irq, keyscan_isr, 0, in keyscan_probe()
194 pdev->name, keypad_data); in keyscan_probe()
206 platform_set_drvdata(pdev, keypad_data); in keyscan_probe()