Lines Matching refs:nkbd
40 struct nkbd { struct
50 struct nkbd *nkbd = serio_get_drvdata(serio); in nkbd_interrupt() argument
53 if (nkbd->keycode[data & NKBD_KEY]) { in nkbd_interrupt()
54 input_report_key(nkbd->dev, nkbd->keycode[data & NKBD_KEY], data & NKBD_PRESS); in nkbd_interrupt()
55 input_sync(nkbd->dev); in nkbd_interrupt()
59 printk(KERN_INFO "input: %s on %s\n", nkbd->dev->name, serio->phys); in nkbd_interrupt()
66 struct nkbd *nkbd; in nkbd_connect() local
71 nkbd = kzalloc(sizeof(struct nkbd), GFP_KERNEL); in nkbd_connect()
73 if (!nkbd || !input_dev) in nkbd_connect()
76 nkbd->serio = serio; in nkbd_connect()
77 nkbd->dev = input_dev; in nkbd_connect()
78 snprintf(nkbd->phys, sizeof(nkbd->phys), "%s/input0", serio->phys); in nkbd_connect()
79 memcpy(nkbd->keycode, nkbd_keycode, sizeof(nkbd->keycode)); in nkbd_connect()
82 input_dev->phys = nkbd->phys; in nkbd_connect()
90 input_dev->keycode = nkbd->keycode; in nkbd_connect()
94 set_bit(nkbd->keycode[i], input_dev->keybit); in nkbd_connect()
97 serio_set_drvdata(serio, nkbd); in nkbd_connect()
103 err = input_register_device(nkbd->dev); in nkbd_connect()
112 kfree(nkbd); in nkbd_connect()
118 struct nkbd *nkbd = serio_get_drvdata(serio); in nkbd_disconnect() local
122 input_unregister_device(nkbd->dev); in nkbd_disconnect()
123 kfree(nkbd); in nkbd_disconnect()