Lines Matching refs:dev
86 static int keyscan_open(struct input_dev *dev)
88 struct st_keyscan *keypad = input_get_drvdata(dev);
93 static void keyscan_close(struct input_dev *dev)
95 struct st_keyscan *keypad = input_get_drvdata(dev);
102 struct device *dev = keypad_data->input_dev->dev.parent;
103 struct device_node *np = dev->of_node;
106 error = matrix_keypad_parse_properties(dev, &keypad_data->n_rows,
109 dev_err(dev, "failed to parse keypad params\n");
115 dev_dbg(dev, "n_rows=%d n_col=%d debounce=%d\n",
129 if (!pdev->dev.of_node) {
130 dev_err(&pdev->dev, "no DT data present\n");
134 keypad_data = devm_kzalloc(&pdev->dev, sizeof(*keypad_data),
139 input_dev = devm_input_allocate_device(&pdev->dev);
141 dev_err(&pdev->dev, "failed to allocate the input device\n");
147 input_dev->dev.parent = &pdev->dev;
164 dev_err(&pdev->dev, "failed to build keymap\n");
171 keypad_data->base = devm_ioremap_resource(&pdev->dev, res);
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);
214 static int keyscan_suspend(struct device *dev)
216 struct platform_device *pdev = to_platform_device(dev);
222 if (device_may_wakeup(dev))
231 static int keyscan_resume(struct device *dev)
233 struct platform_device *pdev = to_platform_device(dev);
240 if (device_may_wakeup(dev))