Lines Matching refs:dev
88 static int keyscan_open(struct input_dev *dev)
90 struct st_keyscan *keypad = input_get_drvdata(dev);
95 static void keyscan_close(struct input_dev *dev)
97 struct st_keyscan *keypad = input_get_drvdata(dev);
104 struct device *dev = keypad_data->input_dev->dev.parent;
105 struct device_node *np = dev->of_node;
108 error = matrix_keypad_parse_properties(dev, &keypad_data->n_rows,
111 dev_err(dev, "failed to parse keypad params\n");
117 dev_dbg(dev, "n_rows=%d n_col=%d debounce=%d\n",
130 if (!pdev->dev.of_node) {
131 dev_err(&pdev->dev, "no DT data present\n");
135 keypad_data = devm_kzalloc(&pdev->dev, sizeof(*keypad_data),
140 input_dev = devm_input_allocate_device(&pdev->dev);
142 dev_err(&pdev->dev, "failed to allocate the input device\n");
148 input_dev->dev.parent = &pdev->dev;
165 dev_err(&pdev->dev, "failed to build keymap\n");
175 keypad_data->clk = devm_clk_get(&pdev->dev, NULL);
177 dev_err(&pdev->dev, "cannot get clock\n");
183 dev_err(&pdev->dev, "failed to enable clock\n");
193 error = devm_request_irq(&pdev->dev, keypad_data->irq, keyscan_isr, 0,
196 dev_err(&pdev->dev, "failed to request IRQ\n");
202 dev_err(&pdev->dev, "failed to register input device\n");
208 device_set_wakeup_capable(&pdev->dev, 1);
213 static int keyscan_suspend(struct device *dev)
215 struct platform_device *pdev = to_platform_device(dev);
221 if (device_may_wakeup(dev))
230 static int keyscan_resume(struct device *dev)
232 struct platform_device *pdev = to_platform_device(dev);
239 if (device_may_wakeup(dev))