Lines Matching refs:idev
54 struct input_dev *idev; member
91 static void apanel_poll(struct input_dev *idev) in apanel_poll() argument
93 struct apanel *ap = input_get_drvdata(idev); in apanel_poll()
108 dev_dbg(&idev->dev, APANEL ": data %#x\n", data); in apanel_poll()
109 for (i = 0; i < idev->keycodemax; i++) in apanel_poll()
111 report_key(idev, ap->keymap[i]); in apanel_poll()
127 struct input_dev *idev; in apanel_probe() local
135 idev = devm_input_allocate_device(&client->dev); in apanel_probe()
136 if (!idev) in apanel_probe()
139 ap->idev = idev; in apanel_probe()
150 input_set_drvdata(idev, ap); in apanel_probe()
152 idev->name = APANEL_NAME " buttons"; in apanel_probe()
153 idev->phys = "apanel/input0"; in apanel_probe()
154 idev->id.bustype = BUS_HOST; in apanel_probe()
157 idev->keycode = ap->keymap; in apanel_probe()
158 idev->keycodesize = sizeof(ap->keymap[0]); in apanel_probe()
159 idev->keycodemax = (device_chip[APANEL_DEV_CDBTN] != CHIP_NONE) ? 12 : 4; in apanel_probe()
161 set_bit(EV_KEY, idev->evbit); in apanel_probe()
162 for (i = 0; i < idev->keycodemax; i++) in apanel_probe()
164 set_bit(ap->keymap[i], idev->keybit); in apanel_probe()
166 err = input_setup_polling(idev, apanel_poll); in apanel_probe()
170 input_set_poll_interval(idev, POLL_INTERVAL_DEFAULT); in apanel_probe()
172 err = input_register_device(idev); in apanel_probe()