Lines Matching refs:idev
106 struct input_dev *idev;
132 static int ati_remote2_open(struct input_dev *idev)
134 struct ati_remote2 *ar2 = input_get_drvdata(idev);
154 static void ati_remote2_close(struct input_dev *idev)
156 struct ati_remote2 *ar2 = input_get_drvdata(idev);
164 struct input_dev *idev = ar2->idev;
185 input_event(idev, EV_REL, REL_X, (s8) data[1]);
186 input_event(idev, EV_REL, REL_Y, (s8) data[2]);
187 input_sync(idev);
203 struct input_dev *idev = ar2->idev;
258 ar2->jiffies = jiffies + msecs_to_jiffies(idev->rep[REP_DELAY]);
270 ar2->jiffies = jiffies + msecs_to_jiffies(idev->rep[REP_PERIOD]);
279 input_event(idev, EV_KEY, ati_remote2_key_table[index].key_code, data[1]);
280 input_sync(idev);
339 struct input_dev *idev;
342 idev = input_allocate_device();
343 if (!idev)
346 ar2->idev = idev;
347 input_set_drvdata(idev, ar2);
349 idev->evbit[0] = BIT(EV_KEY) | BIT(EV_REP) | BIT(EV_REL);
350 idev->keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT);
351 idev->relbit[0] = BIT(REL_X) | BIT(REL_Y);
353 set_bit(ati_remote2_key_table[i].key_code, idev->keybit);
355 idev->rep[REP_DELAY] = 250;
356 idev->rep[REP_PERIOD] = 33;
358 idev->open = ati_remote2_open;
359 idev->close = ati_remote2_close;
361 idev->name = ar2->name;
362 idev->phys = ar2->phys;
364 usb_to_input_id(ar2->udev, &idev->id);
365 idev->dev.parent = &ar2->udev->dev;
367 retval = input_register_device(idev);
369 input_free_device(idev);
515 input_unregister_device(ar2->idev);