Lines Matching refs:hil_dev

107 } hil_dev;  variable
116 switch (hil_dev.data[0]) { in poll_finished()
118 down = (hil_dev.data[1] & 1) == 0; in poll_finished()
119 scode = hil_dev.data[1] >> 1; in poll_finished()
121 input_report_key(hil_dev.dev, key, down); in poll_finished()
124 hil_dev.curdev = 0; in poll_finished()
136 if (hil_dev.curdev) in handle_status()
138 hil_dev.curdev = c & 7; in handle_status()
139 hil_dev.ptr = 0; in handle_status()
147 if (hil_dev.curdev) { in handle_data()
148 hil_dev.data[hil_dev.ptr++] = c; in handle_data()
149 hil_dev.ptr &= 15; in handle_data()
170 hil_dev.s = s; in hil_interrupt()
171 hil_dev.c = c; in hil_interrupt()
173 hil_dev.valid = 1; in hil_interrupt()
183 guard(spinlock_irqsave)(&hil_dev.lock); in hil_do()
204 if (hil_dev.dev) in hil_keyb_init()
208 spin_lock_init(&hil_dev.lock); in hil_keyb_init()
210 hil_dev.dev = input_allocate_device(); in hil_keyb_init()
211 if (!hil_dev.dev) in hil_keyb_init()
214 err = request_irq(HIL_IRQ, hil_interrupt, 0, "hil", hil_dev.dev_id); in hil_keyb_init()
224 hil_dev.valid = 0; /* clear any pending data */ in hil_keyb_init()
227 wait_event_interruptible_timeout(hil_wait, hil_dev.valid, 3 * HZ); in hil_keyb_init()
228 if (!hil_dev.valid) in hil_keyb_init()
231 c = hil_dev.c; in hil_keyb_init()
232 hil_dev.valid = 0; in hil_keyb_init()
247 __set_bit(hphilkeyb_keycode[i], hil_dev.dev->keybit); in hil_keyb_init()
249 hil_dev.dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); in hil_keyb_init()
250 hil_dev.dev->ledbit[0] = BIT_MASK(LED_NUML) | BIT_MASK(LED_CAPSL) | in hil_keyb_init()
252 hil_dev.dev->keycodemax = HIL_KEYCODES_SET1_TBLSIZE; in hil_keyb_init()
253 hil_dev.dev->keycodesize= sizeof(hphilkeyb_keycode[0]); in hil_keyb_init()
254 hil_dev.dev->keycode = hphilkeyb_keycode; in hil_keyb_init()
255 hil_dev.dev->name = "HIL keyboard"; in hil_keyb_init()
256 hil_dev.dev->phys = "hpkbd/input0"; in hil_keyb_init()
258 hil_dev.dev->id.bustype = BUS_HIL; in hil_keyb_init()
259 hil_dev.dev->id.vendor = PCI_VENDOR_ID_HP; in hil_keyb_init()
260 hil_dev.dev->id.product = 0x0001; in hil_keyb_init()
261 hil_dev.dev->id.version = 0x0010; in hil_keyb_init()
263 err = input_register_device(hil_dev.dev); in hil_keyb_init()
270 hil_dev.dev->name, kbid, HILBASE, HIL_IRQ); in hil_keyb_init()
276 free_irq(HIL_IRQ, hil_dev.dev_id); in hil_keyb_init()
278 input_free_device(hil_dev.dev); in hil_keyb_init()
279 hil_dev.dev = NULL; in hil_keyb_init()
286 free_irq(HIL_IRQ, hil_dev.dev_id); in hil_keyb_exit()
291 input_unregister_device(hil_dev.dev); in hil_keyb_exit()
292 hil_dev.dev = NULL; in hil_keyb_exit()
299 if (hil_dev.dev) in hil_probe_chip()
310 hil_dev.dev_id = dev; in hil_probe_chip()
356 if (hil_dev.dev) in hil_init()