Lines Matching defs:input
16 #include <linux/input.h>
17 #include <linux/input/sh_keysc.h>
37 struct input_dev *input;
146 input_event(priv->input, EV_KEY, k, 1);
151 input_event(priv->input, EV_KEY, k, 0);
156 input_sync(priv->input);
166 struct input_dev *input;
205 priv->input = input_allocate_device();
206 if (!priv->input) {
207 dev_err(&pdev->dev, "failed to allocate input device\n");
212 input = priv->input;
213 input->evbit[0] = BIT_MASK(EV_KEY);
215 input->name = pdev->name;
216 input->phys = "sh-keysc-keys/input0";
217 input->dev.parent = &pdev->dev;
219 input->id.bustype = BUS_HOST;
220 input->id.vendor = 0x0001;
221 input->id.product = 0x0001;
222 input->id.version = 0x0100;
224 input->keycode = pdata->keycodes;
225 input->keycodesize = sizeof(pdata->keycodes[0]);
226 input->keycodemax = ARRAY_SIZE(pdata->keycodes);
236 __set_bit(pdata->keycodes[i], input->keybit);
237 __clear_bit(KEY_RESERVED, input->keybit);
239 error = input_register_device(input);
241 dev_err(&pdev->dev, "failed to register input device\n");
259 input_free_device(input);
274 input_unregister_device(priv->input);