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()
185 spin_lock_irqsave(&hil_dev.lock, flags); in hil_do()
194 spin_unlock_irqrestore(&hil_dev.lock, flags); in hil_do()
206 if (hil_dev.dev) in hil_keyb_init()
210 spin_lock_init(&hil_dev.lock); in hil_keyb_init()
212 hil_dev.dev = input_allocate_device(); in hil_keyb_init()
213 if (!hil_dev.dev) in hil_keyb_init()
216 err = request_irq(HIL_IRQ, hil_interrupt, 0, "hil", hil_dev.dev_id); in hil_keyb_init()
226 hil_dev.valid = 0; /* clear any pending data */ in hil_keyb_init()
229 wait_event_interruptible_timeout(hil_wait, hil_dev.valid, 3 * HZ); in hil_keyb_init()
230 if (!hil_dev.valid) in hil_keyb_init()
233 c = hil_dev.c; in hil_keyb_init()
234 hil_dev.valid = 0; in hil_keyb_init()
249 __set_bit(hphilkeyb_keycode[i], hil_dev.dev->keybit); in hil_keyb_init()
251 hil_dev.dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP); in hil_keyb_init()
252 hil_dev.dev->ledbit[0] = BIT_MASK(LED_NUML) | BIT_MASK(LED_CAPSL) | in hil_keyb_init()
254 hil_dev.dev->keycodemax = HIL_KEYCODES_SET1_TBLSIZE; in hil_keyb_init()
255 hil_dev.dev->keycodesize= sizeof(hphilkeyb_keycode[0]); in hil_keyb_init()
256 hil_dev.dev->keycode = hphilkeyb_keycode; in hil_keyb_init()
257 hil_dev.dev->name = "HIL keyboard"; in hil_keyb_init()
258 hil_dev.dev->phys = "hpkbd/input0"; in hil_keyb_init()
260 hil_dev.dev->id.bustype = BUS_HIL; in hil_keyb_init()
261 hil_dev.dev->id.vendor = PCI_VENDOR_ID_HP; in hil_keyb_init()
262 hil_dev.dev->id.product = 0x0001; in hil_keyb_init()
263 hil_dev.dev->id.version = 0x0010; in hil_keyb_init()
265 err = input_register_device(hil_dev.dev); in hil_keyb_init()
272 hil_dev.dev->name, kbid, HILBASE, HIL_IRQ); in hil_keyb_init()
278 free_irq(HIL_IRQ, hil_dev.dev_id); in hil_keyb_init()
280 input_free_device(hil_dev.dev); in hil_keyb_init()
281 hil_dev.dev = NULL; in hil_keyb_init()
288 free_irq(HIL_IRQ, hil_dev.dev_id); in hil_keyb_exit()
293 input_unregister_device(hil_dev.dev); in hil_keyb_exit()
294 hil_dev.dev = NULL; in hil_keyb_exit()
301 if (hil_dev.dev) in hil_probe_chip()
312 hil_dev.dev_id = dev; in hil_probe_chip()
358 if (hil_dev.dev) in hil_init()