Lines Matching refs:keypad_data
103 static int keypad_matrix_key_parse_dt(struct st_keyscan *keypad_data)
105 struct device *dev = keypad_data->input_dev->dev.parent;
109 error = matrix_keypad_parse_of_params(dev, &keypad_data->n_rows,
110 &keypad_data->n_cols);
116 of_property_read_u32(np, "st,debounce-us", &keypad_data->debounce_us);
119 keypad_data->n_rows, keypad_data->n_cols,
120 keypad_data->debounce_us);
127 struct st_keyscan *keypad_data;
137 keypad_data = devm_kzalloc(&pdev->dev, sizeof(*keypad_data),
139 if (!keypad_data)
156 error = keypad_matrix_key_parse_dt(keypad_data);
161 keypad_data->n_rows,
162 keypad_data->n_cols,
169 input_set_drvdata(input_dev, keypad_data);
171 keypad_data->input_dev = input_dev;
174 keypad_data->base = devm_ioremap_resource(&pdev->dev, res);
175 if (IS_ERR(keypad_data->base))
176 return PTR_ERR(keypad_data->base);
178 keypad_data->clk = devm_clk_get(&pdev->dev, NULL);
179 if (IS_ERR(keypad_data->clk)) {
181 return PTR_ERR(keypad_data->clk);
184 error = clk_enable(keypad_data->clk);
190 keyscan_stop(keypad_data);
192 keypad_data->irq = platform_get_irq(pdev, 0);
193 if (keypad_data->irq < 0) {
198 error = devm_request_irq(&pdev->dev, keypad_data->irq, keyscan_isr, 0,
199 pdev->name, keypad_data);
211 platform_set_drvdata(pdev, keypad_data);